Elias Mårtenson
2017-12-05 10:46:03 UTC
I made a typo and was presented with an APL stack trace which suggests a
bug in GNU APL.
The reduced test case is as follows:
* (2 2âŽ1) +â€1 0 1 1*
Which presents the following:
Incomplete value at Symbol.cc:128
Addr: 0x55891db89770
Rank: 1
Shape: â1â
Flags: --
First: 1
Dynamic: DynamicObject: 0x55891db89778 (Value: 0x55891db89778) :
prev: 0x55891db89948
next: 0x55891db895a8
allocated: Bif_OPER2_RANK.cc:403
value history disabled
==============================================================================
Assertion failed: 0
in Function: assign
in file: Symbol.cc:131
Call stack:
----------------------------------------
-- Stack trace at Symbol.cc:131
----------------------------------------
0x7FCC546B1F6A __libc_start_main
0x55891BD3B595 main
0x55891BEBE96D Workspace::immediate_execution(bool)
0x55891BD917AF Command::process_line()
0x55891BD92057 Command::do_APL_expression(UCS_string&)
0x55891BD91867 Command::finish_context()
0x55891BD9D39D Executable::execute_body() const
0x55891BE57764 StateIndicator::run()
0x55891BDE0E6E Prefix::reduce_statements()
0x55891BDDBAA8 Prefix::reduce_A_F_B_()
0x55891BDA6543 DerivedFunction::eval_AB(Value_P, Value_P)
0x55891BD6C03A Bif_OPER2_RANK::eval_ALRB(Value_P, Token&,
Token&, Value_P)
0x55891BD6A9C2 Bif_OPER2_RANK::do_ALyXB(Value_P, int, Token&,
Value_P, Value_P, int)
0x55891BEA228D UserFunction::eval_ALXB(Value_P, Token&,
Value_P, Value_P)
0x55891BE67C55 Symbol::push_value(Value_P)
0x55891BE6A301 Symbol::assign(Value_P, bool, char const*)
0x55891BD4F82C do_Assert(char const*, char const*, char
const*, int)
========================================
SI stack:
Depth: 21
Exec: 0x55891db4c920
Safe exec: 0
Pmode: â ÎŒ-Z__A_LO_RANK_X7_B[1]
PC: 0 (114) 'Ό-X7
Stat: (X7 LA rho_A LB rho_B LZ rho_Z)âX7
err_code: 0x0
Depth: 20
Exec: 0x55891db79e70
Safe exec: 0
Pmode: â (2 2âŽ1) +â€1 0 1 1
PC: 8 (10) ENDL
Stat: (2 2âŽ1) +â€1 0 1 1
err_code: 0x0
Depth: 19
Exec: 0x55891db683c0
Safe exec: 0
Pmode: â (2 2âŽ1) +â€1 0 1
PC: 9 (10) RETURN_STATS
Stat: (2 2âŽ1) +â€1 0 1
err_code: 0x20002
thrown at: Prefix.cc:1780
e_msg_1: 'SYNTAX ERROR'
e_msg_2: ' (2 2âŽ1)+â€1 0 1'
e_msg_3: ' ^ ^'
Depth: 18
Exec: 0x55891db4c920
Safe exec: 0
Pmode: â ÎŒ-Z__A_LO_RANK_X7_B[1]
PC: 0 (114) 'Ό-X7
Stat: (X7 LA rho_A LB rho_B LZ rho_Z)âX7
err_code: 0xA01
thrown at: Symbol.cc:131
e_msg_1: 'Assertion failed'
e_msg_2: ''
e_msg_3: ''
Depth: 17
Exec: 0x55891db6dcc0
Safe exec: 0
Pmode: â (2 2âŽ1) +â€1 0 1 2
PC: 8 (10) ENDL
Stat: (2 2âŽ1) +â€1 0 1 2
err_code: 0x0
Depth: 16
Exec: 0x55891db4c920
Safe exec: 0
Pmode: â ÎŒ-Z__A_LO_RANK_X7_B[1]
PC: 0 (114) 'Ό-X7
Stat: (X7 LA rho_A LB rho_B LZ rho_Z)âX7
err_code: 0xA01
thrown at: Symbol.cc:131
e_msg_1: 'Assertion failed'
e_msg_2: ''
e_msg_3: ''
Depth: 15
Exec: 0x55891db7fda0
Safe exec: 0
Pmode: â (2 2âŽ1) +â€1 0 1 2 3
PC: 8 (10) ENDL
Stat: (2 2âŽ1) +â€1 0 1 2 3
err_code: 0x0
Depth: 14
Exec: 0x55891db75660
Safe exec: 0
Pmode: â (2 2âŽ1) +â€1 1 1
PC: 9 (10) RETURN_STATS
Stat: (2 2âŽ1) +â€1 1 1
err_code: 0x20002
thrown at: Prefix.cc:1780
e_msg_1: 'SYNTAX ERROR'
e_msg_2: ' (2 2âŽ1)+â€1 1 1'
e_msg_3: ' ^ ^'
Depth: 13
Exec: 0x55891db6b970
Safe exec: 0
Pmode: â (2 2âŽ1) +â€1 2 3
PC: 9 (10) RETURN_STATS
Stat: (2 2âŽ1) +â€1 2 3
err_code: 0x20002
thrown at: Prefix.cc:1780
e_msg_1: 'SYNTAX ERROR'
e_msg_2: ' (2 2âŽ1)+â€1 2 3'
e_msg_3: ' ^ ^'
Depth: 12
Exec: 0x55891db74ee0
Safe exec: 0
Pmode: â (2 2âŽ1) +â€1 2 3 4 5
PC: 8 (10) ENDL
Stat: (2 2âŽ1) +â€1 2 3 4 5
err_code: 0x50002
thrown at: ScalarFunction.cc:315
e_msg_1: 'RANK ERROR'
e_msg_2: ' (2 2âŽ1)+â€1 2 3 4 5'
e_msg_3: ' ^ ^'
Depth: 11
Exec: 0x55891db4c920
Safe exec: 0
Pmode: â ÎŒ-Z__A_LO_RANK_X7_B[1]
PC: 0 (114) 'Ό-X7
Stat: (X7 LA rho_A LB rho_B LZ rho_Z)âX7
err_code: 0xA01
thrown at: Symbol.cc:131
e_msg_1: 'Assertion failed'
e_msg_2: ''
e_msg_3: ''
Depth: 10
Exec: 0x55891db79fd0
Safe exec: 0
Pmode: â z +â€1 0 2 1 (⢠100 200 300)
PC: 8 (10) ENDL
Stat: z +â€1 0 2 1 (⢠100 200 300)
err_code: 0x0
Depth: 9
Exec: 0x55891db7fe80
Safe exec: 0
Pmode: â z +â€(1 0 ⢠100 200 300)
PC: 9 (10) RETURN_STATS
Stat: z +â€(1 0 ⢠100 200 300)
err_code: 0x20002
thrown at: Prefix.cc:1780
e_msg_1: 'SYNTAX ERROR'
e_msg_2: ' z+â€(1 0â¢100 200 300)'
e_msg_3: ' ^^'
Depth: 8
Exec: 0x55891db4c920
Safe exec: 0
Pmode: â ÎŒ-Z__A_LO_RANK_X7_B[3]
PC: 63 (114) â
Stat: LOOP:Z[N]ââ(rho_AâŽA[N;]) LO rho_BâŽB[N;]
err_code: 0x50003
thrown at: ScalarFunction.cc:315
e_msg_1: 'LENGTH ERROR'
e_msg_2: 'ÎŒ-Z__A_LO_RANK_X7_B[3] ÎŒ-Z[ÎŒ-N]ââ(ÎŒ-rho_AâŽÎŒ-A[ÎŒ-N;])ÎŒ-LO
ÎŒ-rho_BâŽÎŒ-B[ÎŒ-N;]'
e_msg_3: ' ^ ^'
Depth: 7
Exec: 0x55891db800f0
Safe exec: 0
Pmode: â z +â€1 (0 ⢠100 200 300)
PC: 9 (11) ENDL
Stat: z +â€1 (0 ⢠100 200 300)
err_code: 0x0
Depth: 6
Exec: 0x55891db4c920
Safe exec: 0
Pmode: â ÎŒ-Z__A_LO_RANK_X7_B[1]
PC: 0 (114) 'Ό-X7
Stat: (X7 LA rho_A LB rho_B LZ rho_Z)âX7
err_code: 0xA01
thrown at: Symbol.cc:131
e_msg_1: 'Assertion failed'
e_msg_2: ''
e_msg_3: ''
Depth: 5
Exec: 0x55891db6b720
Safe exec: 0
Pmode: â z +â€1 0 100 200 300
PC: 4 (6) ENDL
Stat: z +â€1 0 100 200 300
err_code: 0x0
Depth: 4
Exec: 0x55891db4c920
Safe exec: 0
Pmode: â ÎŒ-Z__A_LO_RANK_X7_B[3]
PC: 63 (114) â
Stat: LOOP:Z[N]ââ(rho_AâŽA[N;]) LO rho_BâŽB[N;]
err_code: 0x50003
thrown at: ScalarFunction.cc:315
e_msg_1: 'LENGTH ERROR'
e_msg_2: 'ÎŒ-Z__A_LO_RANK_X7_B[3] ÎŒ-Z[ÎŒ-N]ââ(ÎŒ-rho_AâŽÎŒ-A[ÎŒ-N;])ÎŒ-LO
ÎŒ-rho_BâŽÎŒ-B[ÎŒ-N;]'
e_msg_3: ' ^ ^'
Depth: 3
Exec: 0x55891db75720
Safe exec: 0
Pmode: â z (+â€1 1) 100 200 300
PC: 7 (9) ENDL
Stat: z (+â€1 1) 100 200 300
err_code: 0x0
Depth: 2
Exec: 0x55891db686a0
Safe exec: 0
Pmode: â 200 300 400 + z
PC: 3 (5) ENDL
Stat: 200 300 400 + z
err_code: 0x50002
thrown at: ScalarFunction.cc:315
e_msg_1: 'RANK ERROR'
e_msg_2: ' 200 300 400+z'
e_msg_3: ' ^ ^'
Depth: 1
Exec: 0x55891db68f90
Safe exec: 0
Pmode: â 100 200 300 400 +[1] z
PC: 6 (8) ENDL
Stat: 100 200 300 400 +[1] z
err_code: 0x50003
thrown at: ScalarFunction.cc:804
e_msg_1: 'LENGTH ERROR'
e_msg_2: ' 100 200 300 400+[1]z'
e_msg_3: ' ^ ^'
Depth: 0
Exec: 0x55891db62d70
Safe exec: 0
Pmode: â a+(âŽz)âŽ100 200 300 400
PC: 7 (10) 'a
Stat: a+(âŽz)âŽ100 200 300 400
err_code: 0x30001
thrown at: Symbol.cc:683
e_msg_1: 'VALUE ERROR'
e_msg_2: ' a+(âŽz)âŽ100 200 300 400'
e_msg_3: ' ^'
==============================================================================
bug in GNU APL.
The reduced test case is as follows:
* (2 2âŽ1) +â€1 0 1 1*
Which presents the following:
Incomplete value at Symbol.cc:128
Addr: 0x55891db89770
Rank: 1
Shape: â1â
Flags: --
First: 1
Dynamic: DynamicObject: 0x55891db89778 (Value: 0x55891db89778) :
prev: 0x55891db89948
next: 0x55891db895a8
allocated: Bif_OPER2_RANK.cc:403
value history disabled
==============================================================================
Assertion failed: 0
in Function: assign
in file: Symbol.cc:131
Call stack:
----------------------------------------
-- Stack trace at Symbol.cc:131
----------------------------------------
0x7FCC546B1F6A __libc_start_main
0x55891BD3B595 main
0x55891BEBE96D Workspace::immediate_execution(bool)
0x55891BD917AF Command::process_line()
0x55891BD92057 Command::do_APL_expression(UCS_string&)
0x55891BD91867 Command::finish_context()
0x55891BD9D39D Executable::execute_body() const
0x55891BE57764 StateIndicator::run()
0x55891BDE0E6E Prefix::reduce_statements()
0x55891BDDBAA8 Prefix::reduce_A_F_B_()
0x55891BDA6543 DerivedFunction::eval_AB(Value_P, Value_P)
0x55891BD6C03A Bif_OPER2_RANK::eval_ALRB(Value_P, Token&,
Token&, Value_P)
0x55891BD6A9C2 Bif_OPER2_RANK::do_ALyXB(Value_P, int, Token&,
Value_P, Value_P, int)
0x55891BEA228D UserFunction::eval_ALXB(Value_P, Token&,
Value_P, Value_P)
0x55891BE67C55 Symbol::push_value(Value_P)
0x55891BE6A301 Symbol::assign(Value_P, bool, char const*)
0x55891BD4F82C do_Assert(char const*, char const*, char
const*, int)
========================================
SI stack:
Depth: 21
Exec: 0x55891db4c920
Safe exec: 0
Pmode: â ÎŒ-Z__A_LO_RANK_X7_B[1]
PC: 0 (114) 'Ό-X7
Stat: (X7 LA rho_A LB rho_B LZ rho_Z)âX7
err_code: 0x0
Depth: 20
Exec: 0x55891db79e70
Safe exec: 0
Pmode: â (2 2âŽ1) +â€1 0 1 1
PC: 8 (10) ENDL
Stat: (2 2âŽ1) +â€1 0 1 1
err_code: 0x0
Depth: 19
Exec: 0x55891db683c0
Safe exec: 0
Pmode: â (2 2âŽ1) +â€1 0 1
PC: 9 (10) RETURN_STATS
Stat: (2 2âŽ1) +â€1 0 1
err_code: 0x20002
thrown at: Prefix.cc:1780
e_msg_1: 'SYNTAX ERROR'
e_msg_2: ' (2 2âŽ1)+â€1 0 1'
e_msg_3: ' ^ ^'
Depth: 18
Exec: 0x55891db4c920
Safe exec: 0
Pmode: â ÎŒ-Z__A_LO_RANK_X7_B[1]
PC: 0 (114) 'Ό-X7
Stat: (X7 LA rho_A LB rho_B LZ rho_Z)âX7
err_code: 0xA01
thrown at: Symbol.cc:131
e_msg_1: 'Assertion failed'
e_msg_2: ''
e_msg_3: ''
Depth: 17
Exec: 0x55891db6dcc0
Safe exec: 0
Pmode: â (2 2âŽ1) +â€1 0 1 2
PC: 8 (10) ENDL
Stat: (2 2âŽ1) +â€1 0 1 2
err_code: 0x0
Depth: 16
Exec: 0x55891db4c920
Safe exec: 0
Pmode: â ÎŒ-Z__A_LO_RANK_X7_B[1]
PC: 0 (114) 'Ό-X7
Stat: (X7 LA rho_A LB rho_B LZ rho_Z)âX7
err_code: 0xA01
thrown at: Symbol.cc:131
e_msg_1: 'Assertion failed'
e_msg_2: ''
e_msg_3: ''
Depth: 15
Exec: 0x55891db7fda0
Safe exec: 0
Pmode: â (2 2âŽ1) +â€1 0 1 2 3
PC: 8 (10) ENDL
Stat: (2 2âŽ1) +â€1 0 1 2 3
err_code: 0x0
Depth: 14
Exec: 0x55891db75660
Safe exec: 0
Pmode: â (2 2âŽ1) +â€1 1 1
PC: 9 (10) RETURN_STATS
Stat: (2 2âŽ1) +â€1 1 1
err_code: 0x20002
thrown at: Prefix.cc:1780
e_msg_1: 'SYNTAX ERROR'
e_msg_2: ' (2 2âŽ1)+â€1 1 1'
e_msg_3: ' ^ ^'
Depth: 13
Exec: 0x55891db6b970
Safe exec: 0
Pmode: â (2 2âŽ1) +â€1 2 3
PC: 9 (10) RETURN_STATS
Stat: (2 2âŽ1) +â€1 2 3
err_code: 0x20002
thrown at: Prefix.cc:1780
e_msg_1: 'SYNTAX ERROR'
e_msg_2: ' (2 2âŽ1)+â€1 2 3'
e_msg_3: ' ^ ^'
Depth: 12
Exec: 0x55891db74ee0
Safe exec: 0
Pmode: â (2 2âŽ1) +â€1 2 3 4 5
PC: 8 (10) ENDL
Stat: (2 2âŽ1) +â€1 2 3 4 5
err_code: 0x50002
thrown at: ScalarFunction.cc:315
e_msg_1: 'RANK ERROR'
e_msg_2: ' (2 2âŽ1)+â€1 2 3 4 5'
e_msg_3: ' ^ ^'
Depth: 11
Exec: 0x55891db4c920
Safe exec: 0
Pmode: â ÎŒ-Z__A_LO_RANK_X7_B[1]
PC: 0 (114) 'Ό-X7
Stat: (X7 LA rho_A LB rho_B LZ rho_Z)âX7
err_code: 0xA01
thrown at: Symbol.cc:131
e_msg_1: 'Assertion failed'
e_msg_2: ''
e_msg_3: ''
Depth: 10
Exec: 0x55891db79fd0
Safe exec: 0
Pmode: â z +â€1 0 2 1 (⢠100 200 300)
PC: 8 (10) ENDL
Stat: z +â€1 0 2 1 (⢠100 200 300)
err_code: 0x0
Depth: 9
Exec: 0x55891db7fe80
Safe exec: 0
Pmode: â z +â€(1 0 ⢠100 200 300)
PC: 9 (10) RETURN_STATS
Stat: z +â€(1 0 ⢠100 200 300)
err_code: 0x20002
thrown at: Prefix.cc:1780
e_msg_1: 'SYNTAX ERROR'
e_msg_2: ' z+â€(1 0â¢100 200 300)'
e_msg_3: ' ^^'
Depth: 8
Exec: 0x55891db4c920
Safe exec: 0
Pmode: â ÎŒ-Z__A_LO_RANK_X7_B[3]
PC: 63 (114) â
Stat: LOOP:Z[N]ââ(rho_AâŽA[N;]) LO rho_BâŽB[N;]
err_code: 0x50003
thrown at: ScalarFunction.cc:315
e_msg_1: 'LENGTH ERROR'
e_msg_2: 'ÎŒ-Z__A_LO_RANK_X7_B[3] ÎŒ-Z[ÎŒ-N]ââ(ÎŒ-rho_AâŽÎŒ-A[ÎŒ-N;])ÎŒ-LO
ÎŒ-rho_BâŽÎŒ-B[ÎŒ-N;]'
e_msg_3: ' ^ ^'
Depth: 7
Exec: 0x55891db800f0
Safe exec: 0
Pmode: â z +â€1 (0 ⢠100 200 300)
PC: 9 (11) ENDL
Stat: z +â€1 (0 ⢠100 200 300)
err_code: 0x0
Depth: 6
Exec: 0x55891db4c920
Safe exec: 0
Pmode: â ÎŒ-Z__A_LO_RANK_X7_B[1]
PC: 0 (114) 'Ό-X7
Stat: (X7 LA rho_A LB rho_B LZ rho_Z)âX7
err_code: 0xA01
thrown at: Symbol.cc:131
e_msg_1: 'Assertion failed'
e_msg_2: ''
e_msg_3: ''
Depth: 5
Exec: 0x55891db6b720
Safe exec: 0
Pmode: â z +â€1 0 100 200 300
PC: 4 (6) ENDL
Stat: z +â€1 0 100 200 300
err_code: 0x0
Depth: 4
Exec: 0x55891db4c920
Safe exec: 0
Pmode: â ÎŒ-Z__A_LO_RANK_X7_B[3]
PC: 63 (114) â
Stat: LOOP:Z[N]ââ(rho_AâŽA[N;]) LO rho_BâŽB[N;]
err_code: 0x50003
thrown at: ScalarFunction.cc:315
e_msg_1: 'LENGTH ERROR'
e_msg_2: 'ÎŒ-Z__A_LO_RANK_X7_B[3] ÎŒ-Z[ÎŒ-N]ââ(ÎŒ-rho_AâŽÎŒ-A[ÎŒ-N;])ÎŒ-LO
ÎŒ-rho_BâŽÎŒ-B[ÎŒ-N;]'
e_msg_3: ' ^ ^'
Depth: 3
Exec: 0x55891db75720
Safe exec: 0
Pmode: â z (+â€1 1) 100 200 300
PC: 7 (9) ENDL
Stat: z (+â€1 1) 100 200 300
err_code: 0x0
Depth: 2
Exec: 0x55891db686a0
Safe exec: 0
Pmode: â 200 300 400 + z
PC: 3 (5) ENDL
Stat: 200 300 400 + z
err_code: 0x50002
thrown at: ScalarFunction.cc:315
e_msg_1: 'RANK ERROR'
e_msg_2: ' 200 300 400+z'
e_msg_3: ' ^ ^'
Depth: 1
Exec: 0x55891db68f90
Safe exec: 0
Pmode: â 100 200 300 400 +[1] z
PC: 6 (8) ENDL
Stat: 100 200 300 400 +[1] z
err_code: 0x50003
thrown at: ScalarFunction.cc:804
e_msg_1: 'LENGTH ERROR'
e_msg_2: ' 100 200 300 400+[1]z'
e_msg_3: ' ^ ^'
Depth: 0
Exec: 0x55891db62d70
Safe exec: 0
Pmode: â a+(âŽz)âŽ100 200 300 400
PC: 7 (10) 'a
Stat: a+(âŽz)âŽ100 200 300 400
err_code: 0x30001
thrown at: Symbol.cc:683
e_msg_1: 'VALUE ERROR'
e_msg_2: ' a+(âŽz)âŽ100 200 300 400'
e_msg_3: ' ^'
==============================================================================