public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/46822] New: printf( "%f" ) segv when called from pthread_once
@ 2010-12-06 15:07 isdmter at gmail dot com
  2010-12-06 15:14 ` [Bug c/46822] " isdmter at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: isdmter at gmail dot com @ 2010-12-06 15:07 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: printf( "%f" ) segv when called from pthread_once
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: isdmter@gmail.com


Created attachment 22658
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22658
A 20 line source code that triggers the bug

Hi,

I noticed that a simple call to printf for a double argument always crashes my
program exclusively when called inside a pthread_once function. The call
succeeds in other cases.

The crash occurs for many different versions of GCC (3.3.6, 3.4.6, 4.1.2,
4.3.1, 4.3.2, 4.4.2 and 4.5.1) and also for various printf-like functions
(sprintf, snprintf, etc.).

Thanks.
Isdmter

Configuration:

GCC 4.5.1:
Using built-in specs.
COLLECT_GCC=/local00/home/isdmter/products/gcc-4.5.1/bin/gcc
COLLECT_LTO_WRAPPER=/local00/home/isdmter/products/gcc-4.5.1/libexec/gcc/x86_64-linux-gnu/4.5.1/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ./configure -v --enable-languages=c,c++,fortran --enable-gold
--enable-shared --without-included-gettext --enable-threads=posix --enable-nls
--enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug
--enable-mpfr --enable-gmp --enable-checking=release x86_64-linux-gnu
--with-gmp-include=/local00/home/isdmter/products/gmp-5.0.1/include
--with-gmp-lib=/local00/home/isdmter/products/gmp-5.0.1/lib
--with-mpfr-include=/local00/home/isdmter/products/mpfr-3.0.0/include
--with-mpfr-lib=/local00/home/isdmter/products/mpfr-3.0.0/lib
--with-mpc-include=/local00/home/isdmter/products/mpc-0.8.2/include
--with-mpc-lib=/local00/home/isdmter/products/mpc-0.8.2/lib
--prefix=/local00/home/isdmter/products/gcc-4.5.1 --disable-multilib
--disable-bootstrap --with-system-zlib LDFLAGS='-Wl,-rpath
-Wl,/local00/home/isdmter/products/gmp-5.0.1/lib -Wl,-rpath
-Wl,/local00/home/isdmter/products/mpfr-3.0.0/lib -Wl,-rpath
-Wl,/local00/home/isdmter/products/mpc-0.8.2/lib'
Thread model: posix
gcc version 4.5.1 (GCC)

System:
Debian etch
Linux 2.6.18-4-amd64 #1 SMP Fri May 4 00:37:33 UTC 2007 x86_64 GNU/Linux

Commands to reproduce the bug:
$ gcc -Wall -save-temps -o main -pthread -lpthread main.c
$ ./main


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-11-10  8:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-06 15:07 [Bug c/46822] New: printf( "%f" ) segv when called from pthread_once isdmter at gmail dot com
2010-12-06 15:14 ` [Bug c/46822] " isdmter at gmail dot com
2011-01-17 23:48 ` nicola at gcc dot gnu.org
2011-01-17 23:52 ` [Bug middle-end/46822] " pinskia at gcc dot gnu.org
2013-11-10  8:19 ` pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).