@@ -49,8 +49,11 @@ spawn - linux/macos/windows
4949 build_for 'J904-beta-f'
5050
5151
52- )
52+ *** script segfault can be hard to isolate with previous tool
53+ man_crash
54+ )
5355
56+ load' git/jsource/test/tsu.ijs'
5457load' ~addons/misc/miscutils/utils.ijs'
5558
5659pgit=: ' git/jsource'
@@ -288,3 +291,64 @@ macrun=: 0 : 0
288291#!/bin/sh
289292/users/eric/git/jsource/jlibrary/bin/jconsole -lib LIB.dylib git/jsource/test/tsu.ijs
290293)
294+
295+ NB. following helps find the script that causes a segfaul
296+
297+ man_crash=: 0 : 0
298+ find script that segfaults
299+ build_test segfault closes window and gives no info
300+ these steps determine the script and lines that led to the crash
301+ can run in jhs
302+
303+ crashrun ddall
304+
305+ ...$ crashline (from above) - wait until finished
306+
307+ crashinfo''
308+
309+ ...$ coredumpctl dump -1 > core
310+ gdb git/jsource/jlibrary/bin/libjavx2.so core
311+ c
312+ bt
313+ )
314+
315+ prolog=: ' prolog ''./'
316+
317+ crashtests=: 3 : 0
318+ }.; ' ;' , each' ''' , ~ each' ''' , each y
319+ )
320+
321+ crashtemplate=: 0 : 0
322+ load'git/jsource/test/tsu.ijs'
323+ ddrun=: boxopen <dd>
324+ RUND ddrun
325+ 'ran to the end'
326+ exit''
327+ )
328+
329+ NB. y ddall style list of tests
330+ crashrun=: 3 : 0
331+ (crashtemplate rplc ' <dd>' ; crashtests y )fwrite ' jtestin.txt'
332+ ' ' fwrite ' jtestout.txt'
333+ ' ' fwrite ' jtesterr.txt'
334+ i. 0 0
335+ )
336+
337+ crashinfo=: 3 : 0
338+ lines=: < ;. _2 fread ' jtestout.txt'
339+ tests=: _5 }. each(# prolog)}. each((< prolog)= (# prolog){. each lines)# lines
340+ if. ' ran to the end' -:{. lines do.
341+ echo ' there was no crash'
342+ else.
343+ echo ' crash in script: ' ,;{: tests
344+ echo ' crash line: ' ,;{: lines
345+ i=. lines i.< prolog, (;{: tests), ' .ijs'''
346+ crashdisplay=: ; (i}. lines), each LF
347+ echo ' rundd display: crashdisplay'
348+ end.
349+ i. 0 0
350+ )
351+
352+ crashline=: 0 : 0
353+ git/jsource/jlibrary/bin/jconsole -lib libjavx2.so < jtestin.txt > jtestout.txt 2> jtesterr.txt
354+ )
0 commit comments