Page 1 sur 1

Segmentation fault in Fedora 37 x86_64

Publié : dim. déc. 04, 2022 3:34 pm
par sagitter
Hi all.

A Fedora (37 x86_64) user reported a segmentation fault of giac-1.9.0.29 with this output:

Code : Tout sélectionner

Additional info:
Output from running "icas" in GDB:
0x00005555556aa5ee in nlr_push (nlr=<synthetic pointer>) at ../micropython-1.12/xcas/../py/nlrx64.c:60
60	    __asm volatile (
(gdb) bt
#0  0x00005555556aa5ee in nlr_push (nlr=<synthetic pointer>) at ../micropython-1.12/xcas/../py/nlrx64.c:60
#1  micropy_eval (str=0x55555577bfc4 "1") at ../micropython-1.12/xcas/main.c:495
#2  micropy_ck_eval (line=0x55555577bfc4 "1") at /usr/src/debug/giac-1.9.0.29-1.fc37.x86_64/src/Python.cc:42
#3  0x00005555555a88aa in _sub_I_65535_0.0 ()
#4  0x00007ffff5a4a63e in call_init (env=<optimized out>, argv=0x7fffffffd4c8, argc=1)
    at ../csu/libc-start.c:145
#5  __libc_start_main_impl (main=0x5555555a39a0 <main(int, char**)>, argc=1, argv=0x7fffffffd4c8, 
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd4b8)
    at ../csu/libc-start.c:368
#6  0x00005555555aade5 in _start ()
Let me know if you need other informations

Re: Segmentation fault in Fedora 37 x86_64

Publié : lun. déc. 05, 2022 7:03 am
par parisse
Step by step run inside gdb is not compatible with MicroPython nlr_* assembly code, at least I don't know how to make it compatible. On some ports of giac, I must explicitly compile by hand the nlr_* files in release mode, then compile the remaining files in debug mode if I want to run gdb.

Re: Segmentation fault in Fedora 37 x86_64

Publié : ven. janv. 06, 2023 6:21 am
par frederic han
Dear Bernard,
there are 2 patches done here by Florian Weimer (btw he was waiting for a validation of his account on the forum) to improve C99 compatibility.

https://bugzilla.redhat.com/show_bug.cgi?id=2151473
could you merge them in giac?

Best
Frederic

Re: Segmentation fault in Fedora 37 x86_64

Publié : ven. janv. 06, 2023 5:28 pm
par parisse
Account is now active. I do not activate account unless I get an email (there are about 20 spam account creations per day).
I have uncommented the alloca.h include in mpconfigport.h, but it's not clear what should be done with fenv.h (it should remain compatible with calculator ports).

Re: Segmentation fault in Fedora 37 x86_64

Publié : mar. janv. 10, 2023 2:48 pm
par frederic han
Hi bernard.
these fixes were not enough, but Antonio solved the starting crash by removing the LTO FLAG during the built.