public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: "Gerwin, Joshua A" <joshua.a.gerwin@intel.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: RE: preprocessor/6084: cpp Segmentation Fault Date: Fri, 29 Mar 2002 11:36:00 -0000 [thread overview] Message-ID: <20020329193601.4424.qmail@sources.redhat.com> (raw) The following reply was made to PR preprocessor/6084; it has been noted by GNATS. From: "Gerwin, Joshua A" <joshua.a.gerwin@intel.com> To: "'neil@gcc.gnu.org'" <neil@gcc.gnu.org>, "'gcc-bugs@gcc.gnu.org'"<gcc-bugs@gcc.gnu.org>, "'gcc-prs@gcc.gnu.org'" <gcc-prs@gcc.gnu.org>, "'joshg@hf.intel.com'" <joshg@hf.intel.com>, "'nobody@gcc.gnu.org'"<nobody@gcc.gnu.org>, "'rnesius@ichips.intel.com'"<rnesius@ichips.intel.com>, "Nguyen, Tuan" <tuan.nguyen@intel.com>, "'gcc-gnats@gcc.gnu.org'" <gcc-gnats@gcc.gnu.org> Cc: Subject: RE: preprocessor/6084: cpp Segmentation Fault Date: Fri, 29 Mar 2002 11:35:17 -0800 > -----Original Message----- > From: neil@gcc.gnu.org [mailto:neil@gcc.gnu.org] > Sent: Friday, March 29, 2002 12:20 AM > To: gcc-bugs@gcc.gnu.org; gcc-prs@gcc.gnu.org; joshg@hf.intel.com; > nobody@gcc.gnu.org; rnesius@ichips.intel.com; tuan.nguyen@intel.com > Subject: Re: preprocessor/6084: cpp Segmentation Fault > > > Synopsis: cpp Segmentation Fault > > State-Changed-From-To: open->feedback > State-Changed-By: neil > State-Changed-When: Fri Mar 29 00:20:22 2002 > State-Changed-Why: > Changed to category preprocessor; not a front end issue. > > Quite a surpise to me, too. I take pride in cpp not > segfaulting 8-) > > Could you give me a testcase? I can't reproduce it with > the information supplied. > Or, could you try 3.0.4? There was a segfault fixed in the > later 3.0 cycle, triggered by a combination of command > line options, but I'm not sure which 3.0.x got it. > Judging by your command line, I suspect it is caused by > a certain combination of switches; can you reproduce it > on a simple file like #include <stdio.h> or something? > > Alternatively, if you can't produce a simple testcase, > but can get it to happen on Linux, then please send me the > files so I can track this down, or tell me where it happens > when you're debugging the cpp0 binary. > > Thanks! > > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail& database=gcc&pr=6084 Sorry about the category thing, I didn't notice a preprocessor category on the submit form. The first sighting of the cpp segfault was in a troublesome build of op.c in the vanilla perl 5.6.1 distribution from CPAN. However, you need not go there. Using the same command line options, I can get it to segfault without any source at all, simply by using ^D for stdin. Since an empty file may be aesthetically unsatisfying, I submit the following: $ cat ../../../../accessories/hello.c #include <stdio.h> #ifdef MATHTEST #include <math.h> #endif main() { float X; printf("Hello, World! \n"); #ifdef MATHTEST X = sqrt(4); printf("the sqrt of 4 is %f \n", X); #endif } $ /(path/to)/gcc/3.0.3-64/bin/cpp -DPERL_CORE -fno-strict-aliasing -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -mcpu=v9 -m64 -Wa,-xarch=v9 -O3 -m64 -dM -dD -dI -v ../../../../accessories/hello.c Reading specs from /(path/to)/gcc/3.0.3-64/lib/gcc-lib/sparcv9-sun-solaris2/3.0.3/specs Configured with: ../gcc-3.0.3/configure --host=sparcv9-sun-solaris2 --prefix= /(path/to)/gcc/3.0.3-64 --with-as=/usr/ccs/bin/as --with-nm=/(path/to)/gcc/3.0.3-64/bin/nm --with-ld=/usr/ccs/bin/ld Thread model: posix gcc version 3.0.3 /(path/to)/gcc/3.0.3-64/lib/gcc-lib/sparcv9-sun-solaris2/3.0.3/cpp0 -lang-c -v -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem=unix -Asystem=svr4 -D__OPTIMIZE__ -D__STDC_HOSTED__=1 -dM -dD -dI -D__SIZE_TYPE__=long unsigned int -D__PTRDIFF_TYPE__=long int -D__WCHAR_TYPE__=int -D__WINT_TYPE__=int -D__arch64__ -Acpu=sparc64 -Amachine=sparcv9 -D__sparcv9 -DPERL_CORE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 ../../../../accessories/hello.c GNU CPP version 3.0.3 (cpplib) (sparc) ignoring nonexistent directory "/(path/to)/gcc/3.0.3-64/sparcv9-sun-solaris2/include" #include "..." search starts here: #include <...> search starts here: /usr/local/include /(path/to)/gcc/3.0.3-64/lib/gcc-lib/sparcv9-sun-solaris2/3.0.3/include /usr/include End of search list. cpp: Internal error: Segmentation Fault (program cpp0) Please submit a full bug report. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. A minor experiment in option removal shows that the problem is potentially tied to the -dD tag. Compare: $ /(path/to)/gcc/3.0.3-64/bin/cpp -mcpu=v9 -m64 -Wa,-xarch=v9 -O3 -m64 -dM -dD ../../../../accessories/hello.c cpp: Internal error: Segmentation Fault (program cpp0) Please submit a full bug report. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. $ /usr/intel/pkgs/gcc/3.0.3-64/bin/cpp -mcpu=v9 -m64 -Wa,-xarch=v9 -O3 -m64 -dM ../../../../accessories/hello.c #define __USER_LABEL_PREFIX__ #define _LONG_LONG_HTOL #define __SIZE_TYPE__ long unsigned int #define _LONG_ALIGNMENT 8 #define _LONG_DOUBLE_ALIGNMENT 16 #define P_tmpdir "/var/tmp/" #define _SSIZE_T #define __arch64__ 1 #define __PTRDIFF_TYPE__ long int #define _FILE_OFFSET_BITS 64 #define _ALIGNMENT_REQUIRED 1 #define __HAVE_BUILTIN_SETJMP__ 1 #define _SHORT_ALIGNMENT 2 #define SEEK_SET 0 #define _DOUBLE_ALIGNMENT 8 #define freopen64 freopen #define putchar(x) putc((x), stdout) #define ftello64 ftello #define _NO_FDISK_PRESENT #define _BIT_FIELDS_HTOL #define _LONG_LONG_ALIGNMENT 8 etcetera etcetera etcetera A clue, no? Josh Gerwin, System Programmer/Analyst joshua.a.gerwin@intel.com Intel Corp. NorthWest Engineering Computing
next reply other threads:[~2002-03-29 19:36 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-03-29 11:36 Gerwin, Joshua A [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-05-21 13:34 neil 2002-05-21 13:33 neil 2002-04-17 23:52 neil 2002-04-15 19:46 Gerwin, Joshua A 2002-04-15 18:06 Richard Henderson 2002-04-15 12:06 'Neil Booth' 2002-04-15 11:36 Gerwin, Joshua A 2002-04-15 11:16 'Neil Booth' 2002-04-15 11:06 Gerwin, Joshua A 2002-04-13 1:26 Phil Edwards 2002-04-13 1:16 Phil Edwards 2002-04-12 22:16 Neil Booth 2002-04-12 16:06 Gerwin, Joshua A 2002-04-12 13:36 Phil Edwards 2002-04-03 22:36 'Neil Booth' 2002-04-03 17:06 Gerwin, Joshua A 2002-04-02 22:36 Neil Booth 2002-03-29 12:16 Neil Booth 2002-03-29 0:20 neil
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=20020329193601.4424.qmail@sources.redhat.com \ --to=joshua.a.gerwin@intel.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@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).