bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multiple assignment attempt crashes gnu-apl


From: Dr . Jürgen Sauermann
Subject: Re: Multiple assignment attempt crashes gnu-apl
Date: Thu, 28 Mar 2024 15:47:17 +0100
User-agent: Mozilla Thunderbird

Hi Mike,

first of all the statement is correct:

      (a b c) ← 5
      a
5
      b
5
      c
5

Could you please check if the error also occurs in a freshly started interpreter (as to
rule out that something might have been wrong with one of the variables a, b, or c?

If would also help if you could run:

make apl.lines

in the src directory and then start the interpreter in the src directory. Thst should make
the stack trace show source file line numbers. Note that make apl.lines will take a while.
Unfortunately there are multiple calls of  get_sym_ptr() in function reduce_V_RPAR_ASS_B()
and line numbers could tell us which of them failed.

Thanks,
Jürgen


On 3/27/24 18:48, M.Hall wrote:
I saw a multiple assignment statement in the book "Learning APL with APLX", and tried it, not knowing if GNU-APL accepted it or not. I expected maybe a syntax error, but instead it crashes with a backtrace. I know 'a←b←c←5' works, but I was just playing around with a statement I hadn't seen before.

          (a b c) ← 5
   
    ==============================================================================
    Assertion failed: get_ValueType() == TV_SYM
    in Function:      get_sym_ptr
    in file:          ./Token.hh:240
   
    C/C++ call stack:
   
    ----------------------------------------
    -- Stack trace at Assert.cc:75
    ----------------------------------------
    0x10a8ed87e main
    0x10aab66c5  Workspace::immediate_execution(bool)
    0x10a9422cf   Command::process_line()
    0x10a956bd7    Command::finish_context()
    0x10a96b675     Executable::execute_body() const
    0x10aa400f5      StateIndicator::run()
    0x10a9b4f7f       Prefix::reduce_statements()
    0x10a9b4966        Prefix::reduce_V_RPAR_ASS_B()
    0x10a9012d6         do_Assert(char const*, char const*, char const*, int)
    ========================================
    ========================================
   
    SI stack:
   
    Depth:      0
    Exec:       0x7fad16423400
    Safe exec:  0
    Pmode:      ◊  (a b c) ← 5
    PC:         5 (9) '(... a)←
    Stat:       (a b c) ← 5
    err_code:   0x0
   
    ==============================================================================

    $ apl --cfg
   
    BUILDTAG:
    ---------
       Project:        GNU APL
       Version / SVN:  1.8 / SVN: 1767M
       Build Date:     2024-03-18 02:40:56 UTC
       Build OS:       Darwin 19.6.0 x86_64
       config.status:  default ./configure options
       Archive SVN:    1747

--
Mike Hall




reply via email to

[Prev in Thread] Current Thread [Next in Thread]