Bug 53756

Summary: C preprocessor crash
Product: [Retired] Red Hat Linux Reporter: Havoc Pennington <hp>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-02 19:44:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Havoc Pennington 2001-09-17 19:53:55 UTC
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -Wall -Wunused -Wchar-subscripts
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs
-Wpointer-arith -Wsign-promo -Wno-sign-compare -DORBIT2=1 -D_REENTRANT
-I/usr/include/orbit-2.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/bonobo-activation-2.0
-I/usr/include/libxml2 -DPLUGIN_DIR=\"/usr/lib/bonobo/plugin\"
-DBONOBO_LIBDIR=\"/usr/lib\" -DBONOBO_DATADIR=\"/usr/share\"
-DBONOBO_PIXMAPDIR=\"/usr/share/pixmaps\" -DBONOBO_BINDIR=\"/usr/bin\"
-DBONOBO_LOCALSTATEDIR=\"/var\" -DBONOBO_LOCALEDIR=\"\"
-DG_LOG_DOMAIN=\"Bonobo\" -DVERSION=\"1.102.0\" -O2 -march=i386 -mcpu=i686
-c Bonobo-skels.c  -fPIC -DPIC -o .libs/Bonobo-skels.lo
gcc: Internal error: Bus error (program cpp0)
Please submit a full bug report.


OK, reproducing this is not going to be fun. Basically, try to  build
~hp/libbonobo-1.102.0-2.src.rpm using all the build prereqs from the
unstable tree. I don't know how to come up with a better test case... I
can't send you the preprocessed output as I would for a compiler bug for
obvious reasons.

I'm using gcc-2.96-98

Comment 1 Havoc Pennington 2001-09-17 19:59:54 UTC
OK, de-prioritize this. It only happens with parallel makes, because the Bonobo
build is in some hosed state and headers are missing or something. So cpp has
already encountered some other errors before it crashes, I think.

cpp still shouldn't crash of course but it may not be worth the pain of
installing all these packages on an SMP system to see what the issue is.

Comment 2 Jakub Jelinek 2001-09-18 08:27:10 UTC
Actually if some other process truncates/modifies one of the headers
used during preprocessing, Bus error may happen even without cpp0 being on fault
(cpp0 uses mmap for larger headers and if somebody truncates the file and you
access the part beyond the end, you get SIGBUS).
So I'd be first of all interested on what is bonobo doing with the headers used
by cpp0.

Comment 3 Jakub Jelinek 2004-10-02 19:44:01 UTC
GCC 2.96-RH is too old now and I certainly don't remember seeing
something like this with contemporary preprocessors.