public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "isdmter at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/46822] New: printf( "%f" ) segv when called from pthread_once Date: Mon, 06 Dec 2010 15:07:00 -0000 [thread overview] Message-ID: <bug-46822-4@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2010-12-06 15:07 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-12-06 15:07 isdmter at gmail dot com [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-46822-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).