Probably not helpful. This produced the right answer, but complained a
lot. I just recompiled with gcc, which produced the wrong answer, but
didn't complain.
Bill H.
On 11/24/23 22:01, Bill Heagy wrote:
Does this help:
I've compiled with sanitize:
CC='clang -g -fsanitize=address -fno-omit-frame-pointer
-fsanitize-recover=address' jplatform=linux j64x=j64avx2 make2/build_all.sh
$ USE_OPENMPI=2 ASAN_OPTIONS=halt_on_error=0 ./jlibrary/bin/jconsole
[various complaints starting up]
.......
0j30 ": (*%) 11 c. 665142606648569600281099799288x
=================================================================
==136587==ERROR: AddressSanitizer: global-buffer-overflow on address
0x7eff18c54180 at pc 0x7eff18611c52 bp 0x7ffc21b2e3f0 sp 0x7ffc21b2e3e8
READ of size 8 at 0x7eff18c54180 thread T0
#0 0x7eff18611c51 in mvc
/home/wheagy/git/jsource/make2/obj/linux/j64avx2/../../../../jsrc/u.c:345:8
#1 0x7eff18571535 in jtfmte
/home/wheagy/git/jsource/make2/obj/linux/j64avx2/../../../../jsrc/f2.c:224:94
#2 0x7eff18571535 in jtfmt1
/home/wheagy/git/jsource/make2/obj/linux/j64avx2/../../../../jsrc/f2.c:244:13
#3 0x7eff1856d943 in jtth2a
/home/wheagy/git/jsource/make2/obj/linux/j64avx2/../../../../jsrc/f2.c:287:3
#4 0x7eff1856d943 in jtthorn2
/home/wheagy/git/jsource/make2/obj/linux/j64avx2/../../../../jsrc/f2.c:390:3
#5 0x7eff185c964f in jtparsea
/home/wheagy/git/jsource/make2/obj/linux/j64avx2/../../../../jsrc/p.c:751:10
#6 0x7eff185c817b in jtparse
/home/wheagy/git/jsource/make2/obj/linux/j64avx2/../../../../jsrc/p.c:290:4
#7 0x7eff185d6afb in jtimmex
/home/wheagy/git/jsource/make2/obj/linux/j64avx2/../../../../jsrc/px.c:54:28
#8 0x7eff1858f47c in jtimmexexecct
/home/wheagy/git/jsource/make2/obj/linux/j64avx2/../../../../jsrc/io.c:386:2
#9 0x7eff1858f47c in jdo
/home/wheagy/git/jsource/make2/obj/linux/j64avx2/../../../../jsrc/io.c:422:111
#10 0x7eff1858ee62 in JDo
/home/wheagy/git/jsource/make2/obj/linux/j64avx2/../../../../jsrc/io.c:527:9
#11 0x563c3aa02bff in main
/home/wheagy/git/jsource/make2/obj/linux/j64avx2/../../../../jsrc/jconsole.c:393:28
#12 0x7eff1fe286c9 in __libc_start_call_main
csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#13 0x7eff1fe28784 in __libc_start_main csu/../csu/libc-start.c:360:3
#14 0x563c3a92b440 in _start
(/home/wheagy/git/jsource/jlibrary/bin/jconsole+0x23440) (BuildId:
5cef6dfdd9af34a072711de8a792780461088bc1)
0x7eff18c54180 is located 32 bytes before global variable '.str.13'
defined in
'/home/wheagy/git/jsource/make2/obj/linux/j64avx2/../../../../jsrc/f2.c:104' (0x7eff18c541a0) of size 2
'.str.13' is ascii string '*'
0x7eff18c54182 is located 0 bytes after global variable '.str.12'
defined in
'/home/wheagy/git/jsource/make2/obj/linux/j64avx2/../../../../jsrc/f2.c:98' (0x7eff18c54180) of size 2
'.str.12' is ascii string '0'
SUMMARY: AddressSanitizer: global-buffer-overflow
/home/wheagy/git/jsource/make2/obj/linux/j64avx2/../../../../jsrc/u.c:345:8 in mvc
Shadow bytes around the buggy address:
0x7eff18c53f00: 00 00 00 02 f9 f9 f9 f9 00 00 00 00 00 00 00 00
0x7eff18c53f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7eff18c54000: 00 05 f9 f9 00 07 f9 f9 00 06 f9 f9 04 f9 f9 f9
0x7eff18c54080: 03 f9 f9 f9 02 f9 f9 f9 04 f9 f9 f9 03 f9 f9 f9
0x7eff18c54100: 05 f9 f9 f9 04 f9 f9 f9 03 f9 f9 f9 02 f9 f9 f9
=>0x7eff18c54180:[02]f9 f9 f9 02 f9 f9 f9 00 00 00 f9 f9 f9 f9 f9
0x7eff18c54200: 00 00 06 f9 f9 f9 f9 f9 03 f9 f9 f9 00 00 00 00
0x7eff18c54280: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7eff18c54300: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7eff18c54380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x7eff18c54400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
1.000000000000000000000000000000
On 11/24/23 21:41, Raul Miller wrote:
So... near as I can tell, the problem occurs inside plusXX which
resides between jtva2 and jtxplus.
Specifically, an audittstack in jtva2 like this:
{if(MEMAUDIT&2)audittstack(jt);}
{I lrc=((AHDR2FN*)aadocv->f)(n,m,av,wv,zv,jt); // run one
section. Result of 0 means error
{if(MEMAUDIT&2)audittstack(jt);}
and in jtplusx like this:
XF2(jtxplus){ // a+w
{if(MEMAUDIT&2)audittstack(jt);}
gives me a segfault with a stack trace on that first line of jtxplus,
with plusXX between jtva2 and jtxplus, and of course with the above
lrc= line on the stack for jtva2 (but only after the 150 seconds of
scripting to trigger the problem).
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm