This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 20268 - gcc segfaults on kosher code
gcc segfaults on kosher code
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.0
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-11-03 01:09 EST by Gregory Leblanc
Modified: 2007-04-18 12:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-11-03 12:27:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Output from -save-temps of gcc (120.16 KB, text/plain)
2000-11-03 11:38 EST, Gregory Leblanc
no flags Details

  None (edit)
Description Gregory Leblanc 2000-11-03 01:09:52 EST
GCC is segfaulting on a simple compile.  I'm trying to compile Evolution
from CVS, but I've checked that this compiles elsewhere (on stock RH7 and
on RH6.2 with the patches).  I've verified my gcc install (rpm -V gcc), and
tried this quite a few times.  Here's the command line that I'm running to
get this crash.

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I/usr/lib/glib/include
-I/opt/gnome_cvs//include -DUNICODE_USE_SYSTEM_ICONV
-DG_LOG_DOMAIN=\"libibex\" -I/usr/lib/glib/include -I/usr/X11R6/include -g
-O2 -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations
-Wp,-MD,.deps/ibex_block.pp -c ibex_block.c  -fPIC -DPIC -o
.libs/ibex_block.lo

Here's the output that I get back.  I'll make a backup of this build tree,
so that I can provide additional feedback upon request.  BTW, this machine
is NOT overclocked or doing any other "bad things" with the hardware.


ibex_block.c:246:74: warning: pasting would not give a valid preprocessing
token
ibex_block.c:4: parse error before `<'
In file included from /usr/include/bits/types.h:166,
                 from /usr/include/sys/types.h:31,
                 from /usr/include/db1/db.h:40,
                 from ibex_block.c:6:
/usr/include/bits/pthreadtypes.h:48: parse error before `size_t'
/usr/include/bits/pthreadtypes.h:48: warning: no semicolon at end of struct
or union
/usr/include/bits/pthreadtypes.h:51: parse error before `__stacksize'
/usr/include/bits/pthreadtypes.h:51: warning: data definition has no type
or storage class
/usr/include/bits/pthreadtypes.h:52: warning: data definition has no type
or storage class
In file included from ibex_block.c:6:
/usr/include/db1/db.h:76: parse error before `size_t'
/usr/include/db1/db.h:76: warning: no semicolon at end of struct or union
/usr/include/db1/db.h:77: warning: data definition has no type or storage
class
/usr/include/db1/db.h:121: parse error before `*'
/usr/include/db1/db.h:122: parse error before `*'
/usr/include/db1/db.h:123: parse error before `DBT'
/usr/include/db1/db.h:124: parse error before `DBT'
/usr/include/db1/db.h:142: parse error before `*'
/usr/include/db1/db.h:143: warning: no semicolon at end of struct or union
/usr/include/db1/db.h:146: parse error before `}'
/usr/include/db1/db.h:146: warning: data definition has no type or storage
class
/usr/include/db1/db.h:158: parse error before `size_t'
/usr/include/db1/db.h:171: parse error before `size_t'
/usr/include/db1/db.h:171: warning: no semicolon at end of struct or union
/usr/include/db1/db.h:174: parse error before `}'
/usr/include/db1/db.h:174: warning: data definition has no type or storage
class
ibex_block.c:6: parse error before `=='
In file included from /usr/include/_G_config.h:45,
                 from /usr/include/libio.h:31,
                 from /usr/include/stdio.h:70,
                 from ibex_block.c:9:
/usr/include/gconv.h:71: parse error before `size_t'
/usr/include/gconv.h:84: parse error before `size_t'
/usr/include/gconv.h:93: parse error before `size_t'
/usr/include/gconv.h:169: parse error before `size_t'
/usr/include/gconv.h:169: warning: no semicolon at end of struct or union
/usr/include/gconv.h:172: parse error before `}'
/usr/include/gconv.h:172: warning: data definition has no type or storage
class
In file included from /usr/include/libio.h:31,
                 from /usr/include/stdio.h:70,
                 from ibex_block.c:9:
/usr/include/_G_config.h:47: field `__cd' has incomplete type
/usr/include/_G_config.h:50: field `__cd' has incomplete type
/usr/include/_G_config.h:53: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
Comment 1 Jakub Jelinek 2000-11-03 10:13:46 EST
Please rerun the above command with -save-temps -v additional options and
attach here the resulting .i file.
It looks like the code does not play nice with the included headers (for
whatever reason, without .i file I cannot tell much), but no matter what
even on bad input gcc should never segfault nor generate ICE, so I'd like
the testcase so that I can fix it.
Comment 2 Gregory Leblanc 2000-11-03 11:38:57 EST
Created attachment 5015 [details]
Output from -save-temps of gcc
Comment 3 Jakub Jelinek 2000-11-03 12:17:47 EST
That file (ibex_block.c) has apparently unresolved CVS or RCS conflict in it,
<<<<<<< ibex_block.c
#include <db1/db.h>
=======
>>>>>>> 1.5
That's not valid C obviously, if you fix it, it will work.
I'll work on fixing the ICE though.
Comment 4 Jakub Jelinek 2000-11-03 12:27:39 EST
Richard Kenner fixed this on Sep, 16th in CVS gcc, I've just verified the
backport of this patch into RH gcc fixes it, it will appear in the next
gcc rpm package (gcc-2.96-63), which should make it into rawhide first and
soon after into gcc errata.

Note You need to log in before you can comment on or make changes to this bug.