[Bug libfortran/54012] printf crash with -lgfortran

astroseger at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Oct 30 22:37:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54012

--- Comment #11 from Sergey Rodionov <astroseger at gmail dot com> 2012-10-30 22:37:40 UTC ---
(In reply to comment #10)
> (In reply to comment #9)
> >   "ldd bad":
> >         linux-vdso.so.1 =>  (0x00007fffd97ff000)
> >         libquadmath.so.0 => /usr/lib64/libquadmath.so.0 (0x00007f74e80ec000)
> 
> Could you try linking libquadmath directly instead of libgfortran (which
> implies libquadmath)?
> 
> 
> The reason is that libquadmath installs, if possible, GLIBC's printf hooks, cf.
> http://gcc.gnu.org/onlinedocs/libquadmath/quadmath_005fsnprintf.html
> and the source code at
> http://gcc.gnu.org/viewcvs/trunk/libquadmath/printf/quadmath-printf.c?view=markup
> 
> With those hooks, "printf("%Qe\n", float128_number)" will work. In principle,
> it shouldn't cause those issues, but depending on the GLIBC version it might.
> 
> 
> (If libquadmath is the cause, it also explains that it works with -static as
> libgfortran only statically links libquadmath if needed.)


Yes. you are right. The real problem is libquadmath. If I compile with
-lquadmath it crash... 

But interesting that quadmath_snprintf by itself works...



More information about the Gcc-bugs mailing list