You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I attempted to build polyml 5.9 for Fedora, but Tests/Succeed/Test160.ML segfaulted on the 32-bit ARM builder. Since that platform is the only 32-bit bytecode platform we build for, I tried passing --disable-native-codegeneration to configure on the 32-bit x86 builder to see if the crash is ARM-specific. It, too, segfaulted, so this seems to be a generic issue with 32-bit bytecode systems. This is what gdb has to say:
(gdb) run --script Tests/Succeed/Test160.ML
Thread 7 "poly" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf587cac0 (LWP 96)]
0xf7f52292 in PolyObject::Get (i=0, this=<optimized out>) at /builddir/build/BUILD/polyml-5.9/libpolyml/globals.h:309
309 PolyWord Get(POLYUNSIGNED i) const { return ((PolyWord*)this)[i]; }
(gdb) bt
#0 0xf7f52292 in PolyObject::Get (i=0, this=<optimized out>)
at /builddir/build/BUILD/polyml-5.9/libpolyml/globals.h:309
#1 ByteCodeInterpreter::RunInterpreter (this=<optimized out>, taskData=<optimized out>)
at /builddir/build/BUILD/polyml-5.9/libpolyml/bytecode.cpp:846
#2 0xf7f77429 in IntTaskData::EnterPolyCode (this=0x83dc140)
at /builddir/build/BUILD/polyml-5.9/libpolyml/interpreter.cpp:293
#3 NewThreadFunction (parameter=0x83dc140) at /builddir/build/BUILD/polyml-5.9/libpolyml/processes.cpp:1253
#4 0xf7dc1966 in start_thread (arg=<optimized out>) at pthread_create.c:434
#5 0xf7e4796c in clone3 () at ../sysdeps/unix/sysv/linux/i386/clone3.S:111
Given the comment on line 28 of Test160.ML about overflow, I tried defining just the random function, then ran "doFor random 100;". That triggered the segfault. I've been able to reduce it to this:
> Real.toInt IEEEReal.TO_NEGINF 1000000000.0;
val it = 1000000000: int
> Real.toInt IEEEReal.TO_NEGINF 1000000001.0;
Segmentation fault (core dumped)
The text was updated successfully, but these errors were encountered:
Thanks for reporting it and narrowing it down. The interpreter wasn't generating the Overflow exception properly in Real.toInt. This bug was also present in the 64-bit interpreter; it just wasn't triggered by this test. I'll add this fix to the fixes branch shortly.
I attempted to build polyml 5.9 for Fedora, but Tests/Succeed/Test160.ML segfaulted on the 32-bit ARM builder. Since that platform is the only 32-bit bytecode platform we build for, I tried passing
--disable-native-codegeneration
to configure on the 32-bit x86 builder to see if the crash is ARM-specific. It, too, segfaulted, so this seems to be a generic issue with 32-bit bytecode systems. This is what gdb has to say:Given the comment on line 28 of Test160.ML about overflow, I tried defining just the random function, then ran "doFor random 100;". That triggered the segfault. I've been able to reduce it to this:
The text was updated successfully, but these errors were encountered: