Here you go with gdb.
Debian testing, latest source update, compiled with clang, "-g" flag added:
wheagy@bigflight:~/git/jsource$ OMP_NUM_THREADS=2 gdb jlibrary/bin/jconsole
GNU gdb (Debian 9.1-3) 9.1
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from jlibrary/bin/jconsole...
(gdb) r
Starting program: /home/wheagy/git/jsource/jlibrary/bin/jconsole
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Detaching after vfork from child process 11038]
test=:monad define
for_i. <0 do.
i
end.
)
test''
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff778ff96 in jtevery (jt=0x430000, w=0x4689c0, fs=0x0,
f1=0x7ffff77a0eb0 <jtmatth1>) at ../../../../jsrc/cu.c:36
36 if(boxedw=BOX&AT(w))virtw=*(wv=AAV(w)); // if input is boxed, point
to first box
(gdb) bt
#0 0x00007ffff778ff96 in jtevery (jt=0x430000, w=0x4689c0, fs=0x0,
f1=0x7ffff77a0eb0 <jtmatth1>) at ../../../../jsrc/cu.c:36
#1 0x00007ffff779c315 in jtthbox (jt=0x430000, w=0x4689c0)
at ../../../../jsrc/f.c:508
#2 jtthorn1main (jt=0x468900, w=0x4689c0) at ../../../../jsrc/f.c:581
#3 0x00007ffff779f169 in jtthorn1u (jt=0x430000, w=0x4689c0)
at ../../../../jsrc/f.c:602
#4 jtjprx (jt=0x430000, ieol=0, maxlen=256, lb=0, la=222, w=0x4689c0)
at ../../../../jsrc/f.c:718
#5 0x00007ffff77a0acf in jtjpr1 (jt=0x430000, w=0x4689c0)
at ../../../../jsrc/f.c:861
#6 0x00007ffff77a0999 in jtjpr (jt=0x430000, w=0x4689c0)
at ../../../../jsrc/f.c:881
#7 0x00007ffff77ba813 in jtimmex (jt=0x430000, w=<optimized out>)
at ../../../../jsrc/px.c:45
#8 0x00007ffff77aa76f in jdo (jt=0x430000, lp=<optimized out>)
at ../../../../jsrc/io.c:171
#9 0x00007ffff77aab94 in JDo (jt=0x468900,
lp=0x4689f8 "P\233\246\367\377\177") at ../../../../jsrc/io.c:240
#10 0x0000000000401bf6 in main (argc=<optimized out>, argv=<optimized out>)
at ../../../../jsrc/jconsole.c:313
(gdb)
On 4/20/20 6:10 AM, Dimitri Georganas wrote:
Not much from gdb (I've only limited knowledge how to debug)... If there's
something else I can try, pls let me know.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6a54f3e in jtfa () from /home/dg/j901/bin/libj.so
(gdb) frame 0
#0 0x00007ffff6a54f3e in jtfa () from /home/dg/j901/bin/libj.so
On Mon, Apr 20, 2020 at 11:32 AM bill lam <bbill....@gmail.com> wrote:
I can reproduce the crash. A slightly simpler test is
test=:monad define
for_i. <0 do.
i
end.
)
It seems only crash for boxed value, the following did not crash
test=:monad define
for_i. 0 do.
i
end.
)
IIRC there was change in loop index in j901. The crash only occurs if i is
taken as the result.
This didn't crash
test=:monad define
for_i. <0 do.
i
123
end.
)
or
test=:monad define
for_i. <0 do.
i
end.
123
)
On Mon, Apr 20, 2020 at 5:16 PM Dimitri Georganas <d...@biodys.com> wrote:
Apologies, another error...when trying different versions and programs
(jqt, jconsole, j-mode), I mixed up things.
The segmentation fault happens in all cases with,
test=: monad define
for_i. 'a';'b';'c' do.
*i*
end.
)
On Mon, Apr 20, 2020 at 11:00 AM Dimitri Georganas <d...@biodys.com>
wrote:
901, sorry
On Mon, Apr 20, 2020 at 10:59 AM Dimitri Georganas <d...@biodys.com>
wrote:
Is there something wrong with for_i
<https://code.jsoftware.com/wiki/Vocabulary/fordot>. in 902?
In 807 this works:
test=:monad define
for_i. 'a';'b';'c' do.
smoutput i
end.
)
test''
┌─┐
│a│
└─┘
┌─┐
│b│
└─┘
┌─┐
│c│
└─┘
In 902 I get a segmentation fault when running test'' - This is
Linux, I
haven't run it through gdb yet, but if nobody can reproduce I will
give
it
a try.
Best regards,
Dimitri
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm