Re: [Jprogramming] for_i. seg fault

2020-04-20 Thread Henry Rich
Fixed for next release.  As Bill noted, the failure occured only when the loop variable i or i_index occurs in the loop and that value becomes the final result. Workaround: assign the loop variable to a name where it appears at the end of the last loop. Henry Rich On 4/20/2020 11:17 AM, Bill

Re: [Jprogramming] for_i. seg fault

2020-04-20 Thread Henry Rich
This is far, far away from where the error is.  Work on it if you like, but I am pretty close to a fix, at cx.c:380. Henry Rich On 4/20/2020 11:17 AM, Bill Heagy wrote: Here you go with gdb. Debian testing, latest source update, compiled with clang, "-g" flag added: wheagy@bigflight:~/git/j

Re: [Jprogramming] for_i. seg fault

2020-04-20 Thread Bill Heagy
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

Re: [Jprogramming] for_i. seg fault

2020-04-20 Thread Dimitri Georganas
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. 0x76a54f3e in jtfa () from /home/dg/j901/bin/libj.so (gdb) frame 0 #0 0x76a54f3e in jtfa () from /home/dg/j901

Re: [Jprogramming] for_i. seg fault

2020-04-20 Thread Dimitri Georganas
Correct, i. (I formatted i in bold for emphasis but it was changed into *i*) Thanks, will try gdb to see if that gives more info. On Mon, Apr 20, 2020 at 11:24 AM 'Michael Day' via Programming < programm...@jsoftware.com> wrote: > OK - Just to confirm your amended version, assuming you meant i

Re: [Jprogramming] for_i. seg fault

2020-04-20 Thread bill lam
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

Re: [Jprogramming] for_i. seg fault

2020-04-20 Thread 'Michael Day' via Programming
OK - Just to confirm your amended version,  assuming you meant i rather than *i* crashes my JQt v901 under Windows but returns    test'' ┌─┐ │c│ └─┘ as expected,   in JQt v807 Mike On 20/04/2020 10:15, Dimitri Georganas wrote: Apologies, another error...when trying different versions and p

Re: [Jprogramming] for_i. seg fault

2020-04-20 Thread Dimitri Georganas
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 wrote: > 901, sorry >

Re: [Jprogramming] for_i. seg fault

2020-04-20 Thread Dimitri Georganas
901, sorry On Mon, Apr 20, 2020 at 10:59 AM Dimitri Georganas wrote: > Is there something wrong with for_i > . in 902? > > In 807 this works: > > test=:monad define > > for_i. 'a';'b';'c' do. > > smoutput i > > end. > > ) > > > test'' > > ┌─┐ >

[Jprogramming] for_i. seg fault

2020-04-20 Thread Dimitri Georganas
Is there something wrong with for_i . 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