|
From: | Elias Mårtenson |
Subject: | Re: [Bug-apl] Segmentation fault causes GNU APL version 1.5-1 AMD64 to exit |
Date: | Sun, 3 Jan 2016 00:38:10 +0800 |
Actually the stack size is limited. It's the heap that is not. For C and C++ applications you can set the desired stack size during linking. There is a flag for it but since I'm on mobile right now it's a bit of a hassle to check right now.
Regards,
Elias
Hi Blake,
as of now I suspect the problem is not a too small ⎕WA, but a too
large automatic variable on the stack. General problem in *nix-like OSes
is that they (in practice) never run out of space but begin swapping instead.
And we already have ⎕SYL where you can limit the number of ravel elements available to APL.
You can also set space limits with the ulimit command (a bash built-in).
But none of the above has worked for reproducing the fault.
/// Jürgen
On 01/02/2016 03:36 PM, Blake McBride wrote:
Hi Juergen,
Just a thought, perhaps you can change a parameter in GNU APL (for local testing purposes only) to force a small ⎕wa so that you can simulate the problem and do so more quickly.
Thanks.
Blake
On Sat, Jan 2, 2016 at 7:55 AM, Juergen Sauermann <address@hidden> wrote:
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:
$ apla←1500 1500⍴?(1500×1500)⍴10⎕wa732487680b←⌹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 <address@hidden> 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⎕wa193433600b←⌹aSegmentation fault
[Prev in Thread] | Current Thread | [Next in Thread] |