Hello, I first thought the problem might be due to running Linux in a Virtual 
Machine, but tried your expression running Linux natively on a very old 32-bit 
computer that has only 768MB RAM and 880MB swap space, and of course 32-bit 
Linux and GNU-APL. Here are the results:


      ⎕wa
60051456
      ⌹?(Q,Q←4000)⍴10
Segmentation fault

WS FULL as expected:

      q←4000
      r←q,q
      s←?r⍴10
      ⎕wa
291467264
      ⌹s
WS FULL
      ⌹s
      ^^
But then there's this:

      q←1500
      r←?(q,q)⍴10
      ⌹r
Segmentation fault

I got these errors running the Debian GNU-APL package, then did the full 
compile from apl-1.5.tar.gz dated 3/29/15 from ftp.gnu.org<ftp://ftp.gnu.porg> 
and ran gdb as you suggested. The following resulted on the virtual machine 
implementation:

      ⌹?(Q,Q←1500)⍴10

Program received signal SIGSEGV, Segmentation fault.
0x00000000004a41da in divide_matrix (cZ=<optimized out>,
    need_complex=need_complex@entry=false, rows=rows@entry=1500, 
cols_A=cols_A@entry=1500,
    cA=<optimized out>, cols_B=cols_B@entry=1500, cB=0x7ffff04d8010, nB2=1500) 
at LApack.cc:93
93                       *bb++ = cB[rr + cc*cols_B].get_real_value();

(gdb) bt
#0  0x00000000004a41da in divide_matrix (cZ=<optimized out>,
    need_complex=need_complex@entry=false, rows=rows@entry=1500, 
cols_A=cols_A@entry=1500,
    cA=<optimized out>, cols_B=cols_B@entry=1500, cB=0x7ffff04d8010, nB2=1500) 
at LApack.cc:93
#1  0x00000000004ce4b5 in Bif_F12_DOMINO::eval_AB (this=<optimized out>, A=..., 
B=...)
    at PrimitiveFunction.cc:935
#2  0x00000000004d0f73 in Bif_F12_DOMINO::eval_B (this=0x7f3a80 
<Bif_F12_DOMINO::_fun>, B=...)
    at PrimitiveFunction.cc:875
#3  0x00000000004c8eb2 in Prefix::reduce_MISC_F_B_ (this=0x880958) at 
Prefix.cc:807
#4  0x00000000004c9b29 in Prefix::reduce_statements (this=0x880958) at 
Prefix.cc:555
#5  0x000000000051c650 in StateIndicator::run (this=<optimized out>) at 
StateIndicator.cc:413
#6  0x0000000000495a25 in Executable::execute_body (this=<optimized out>) at 
Executable.cc:247
#7  0x000000000048acda in Command::do_APL_expression (line=...) at 
Command.cc:225
#8  0x000000000048ac1a in Command::process_line () at Command.cc:72
#9  0x000000000056c6f5 in Workspace::immediate_execution (exit_on_error=false)
    at Workspace.cc:167
#10 0x0000000000442465 in main (argc=<optimized out>, argv=<optimized out>) at 
main.cc:372
(gdb)

Hope this helps. Please let me know if you wish other test cases run.


Regards, Rick


________________________________
From: Juergen Sauermann <juergen.sauerm...@t-online.de>
Sent: Saturday, January 2, 2016 7:55 AM
To: Blake McBride; Rick Mayforth
Cc: bug-apl@gnu.org
Subject: Re: [Bug-apl] Segmentation fault causes GNU APL version 1.5-1 AMD64 to 
exit

Hi,

I am currently trying to reproduce the fault, but was not yet able to.
Like in Blake's case, 1500x1500 worked on my machine.
I am currently trying 4000x4000 but that hasn't finished yet (takes ages).

The expression that I am using is:

 ⌹?(Q,Q←4000)⍴10

Rick, I suppose you can reproduce the fault more easily. Please try the
following:

1. in the GNU APL src directory, start gdb with GNU APL:

gdb ./apl
run
⌹?(Q,Q←1500)⍴10

2. after the segfault has occurred, print the backtrace (still in gdb):

bt

Thanks a lot,
Jürgen


On 01/02/2016 02:39 PM, Blake McBride wrote:
Just for reference, I tried your example with the head of the source code 
repository, and I got:

$ apl
      a←1500 1500⍴?(1500×1500)⍴10
      ⎕wa
732487680
      b←⌹a
      )off

However, since your  ⎕wa was substantially less than mine, it may be that you 
ran out of RAM and I didn't.

Also, what version of the GNU APL source code did you start with?  (The 
repository head is highly recommended.)

Hope this helps.

Blake McBride


On Fri, Jan 1, 2016 at 2:03 PM, Rick Mayforth 
<gri...@msn.com<mailto:gri...@msn.com>> wrote:

The following sequence caused the fault. APL exits. The interpreter is running 
under Debian 8 in a VMWare virtual machine with 2GB RAM & 880MB swap space. One 
would expect a WS FULL or some other APL error in this instance rather than a 
forced exit, no?


a←1500 1500 ⍴ ?(1500×1500)⍴10
      ⎕wa
193433600
      b←⌹a
Segmentation fault





Reply via email to