public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "flash at pobox dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/23125] New: OpenBSD's zic.c causes g++ but not gcc to segfault Date: Fri, 29 Jul 2005 03:25:00 -0000 [thread overview] Message-ID: <20050729032118.23125.flash@pobox.com> (raw) [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 4313 bytes --] The OpenBSD file zic.c causes g++ 4.0.1 to segfault, though plain gcc 4.0.1 does not. The plainest way to reproduce this is to get the OpenBSD version from <http://www.openbsd.org/cgi-bin/cvsweb/~checkout~/src/lib/libc/time/zic.c?rev=1.24&content- type=text/plain>, but I'll attach a Delta-reduced version of our modified copy. g++ 3.3.4 rejects it without crashing, but with "confused by earlier errors, bailing out," so this is presumably invalid code, though it seems to be a popular file. (Perhaps I should add OpenBSD to section I of my article :-) I'm not sure if this is the same as my two other segfault bugs: Running the --enable-checking version under GDB fails to catch the segfault, so I couldn't get a stacktrace. (I'm trying to build an -- enable-checking=all version, but it's taken more than twenty-four hours so far.) Session: 74> /opt/gcc401chk/bin/g++ -v ../cpp/bugfiles/GCC_bugfiles/error/105198_zic_min.c Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../configure --enable-checking --prefix=/opt/gcc401chk --enable-languages=c,c+ + Thread model: posix gcc version 4.0.1 /opt/gcc401chk/libexec/gcc/i686-pc-linux-gnu/4.0.1/cc1plus -quiet -v -D_GNU_SOURCE ../cpp/ bugfiles/GCC_bugfiles/error/105198_zic_min.c -quiet -dumpbase 105198_zic_min.c - mtune=pentiumpro -auxbase 105198_zic_min -version -o /tmp/ccGy60bj.s ignoring nonexistent directory "/opt/gcc401chk/lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../i686-pc- linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /opt/gcc401chk/lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../include/c++/4.0.1 /opt/gcc401chk/lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../include/c++/4.0.1/i686-pc-linux-gnu /opt/gcc401chk/lib/gcc/i686-pc-linux-gnu/4.0.1/../../../../include/c++/4.0.1/backward /usr/local/include /opt/gcc401chk/include /opt/gcc401chk/lib/gcc/i686-pc-linux-gnu/4.0.1/include /usr/include End of search list. GNU C++ version 4.0.1 (i686-pc-linux-gnu) compiled by GNU C version 3.3.4 (pre 3.3.5 20040809). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 ../cpp/bugfiles/GCC_bugfiles/error/105198_zic_min.c:1: error: expected unqualified-id before { token ../cpp/bugfiles/GCC_bugfiles/error/105198_zic_min.c:31: error: expected unqualified-id before { token ../cpp/bugfiles/GCC_bugfiles/error/105198_zic_min.c:36: error: expected unqualified-id before { token ../cpp/bugfiles/GCC_bugfiles/error/105198_zic_min.c:37: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. Delta-reduced file: { if (sscanf(cp, scheck(cp, "%d"), &year) != 1) { } while (j != year) { if (year > j) { } } while (j != month) { } { if (strcmp(cp, "") == 0) { /* infile() turns "-" into "" */ } } for (i = 0; i < zonecount; ++i) { if (zp->z_nrules == 0) { if (usestart) { if (useuntil) { if (k < 0 || jtime < ktime) { } } if (usestart) { if (ktime < starttime) { } } } } if (usestart) { } } } { (timecnt == 1 && attypes[0].at < min_time)) { } } int a; { } register const char * bp; PalmSource bug 105198. -- Summary: OpenBSD's zic.c causes g++ but not gcc to segfault Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: minor Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: flash at pobox dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23125
next reply other threads:[~2005-07-29 3:21 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-07-29 3:25 flash at pobox dot com [this message] 2005-07-29 3:50 ` [Bug c++/23125] " flash at pobox dot com 2005-07-29 5:04 ` flash at pobox dot com 2005-07-29 5:35 ` [Bug c++/23125] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org 2005-09-10 3:29 ` pinskia at gcc dot gnu dot org 2005-09-10 3:30 ` [Bug middle-end/23125] " pinskia at gcc dot gnu dot org 2005-09-10 4:41 ` pinskia at gcc dot gnu dot org 2005-09-10 4:56 ` pinskia at gcc dot gnu dot org 2005-09-10 20:34 ` geoffk at geoffk dot org 2005-09-11 15:40 ` Andrew Pinski 2005-09-11 15:40 ` pinskia at physics dot uc dot edu 2005-09-14 6:32 ` pinskia at gcc dot gnu dot org 2005-09-16 19:39 ` mrs at apple dot com 2005-09-27 16:25 ` mmitchel at gcc dot gnu dot 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=20050729032118.23125.flash@pobox.com \ --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).