I use giac for a long time in RPL/2 project (http://www.rpl2.fr). As gcc7 is unable to correctly build giac 1.2, I have upgraded giac to 1.4.9. Now, my software crashes with a segfault.
Code : Tout sélectionner
(gdb) run -is
Starting program: /usr/local/bin/rpl -is
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Program received signal SIGSEGV, Segmentation fault.
giac::gen::~gen (this=0x7fffffffe8a8, __in_chrg=<optimized out>)
at ../rplcas/include/giac/gen.h:692
692 if (*rc!=-1 && !--*rc){
(gdb) up
#1 0x000055555571fc2c in __static_initialization_and_destruction_0(int, int) [clone .constprop.222] ()
(gdb) bt
#0 giac::gen::~gen (this=0x7fffffffe8a8, __in_chrg=<optimized out>)
at ../rplcas/include/giac/gen.h:692
#1 0x000055555571fc2c in __static_initialization_and_destruction_0(int, int) [clone .constprop.222] ()
#2 0x00005555566ecc8d in __libc_csu_init ()
#3 0x00007ffff44caa18 in __libc_start_main (main=0x5555557027d0 <main>,
argc=2, argv=0x7fffffffea28, init=0x5555566ecc40 <__libc_csu_init>,
fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffea18)
at ../csu/libc-start.c:266
#4 0x000055555575629a in _start ()
Of course, I have find some occurrences of "__static_initialization_and_destruction_0" on several C++ forums but I'm not a C++ specialist and I have no idea to fix this mistake.
System : Linux debian Buster (glibc 2.27), gcc 7.3.0. I have built Pari, NTL, CoCoaLib, mpfr gmp and mpfi from sources (I don't use debian packages for these libraries).
Help will be welcome
Best regards,
JB