This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs-1.1.2 SIGSEGV bug


SHORT DESCRIPTION:
When building egcs-1.1.2 native compiler from source, xgcc dumps core
with fatal error regarding cpp and signal 11

SYSTEM:
i686-pc-linux-gnu
	KSI Linux 2.0, kernel 2.2.10, Intel Celeron 333, 96M RAM

GCC:
gcc version egcs-2.90.29 19981031 (egcs-1.0.3a)
	installed from KSI Linux binary disrtibution
*OR*
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
	installed from RedHat 6.0 binary distribution, along with all required
libs
(the problem remains the same)

COMMAND LINES
# objdir = /usr/egcs
# srcdir = /root/egcs-1.1.2
cd /usr/egcs
/root/egcs-1.1.2/configure --prefix=/usr --enable-shared
--enable-languages=c++
make bootstrap

PROBLEM FILE
cpp (and cccp) built in stage 1 of make bootstrap.
It recieves sig 11 and dumps core when processes tmp-dum.c
-------$(objdir)/gcc/Makefile fragment------------
2455:         echo "int xxy_us_dummy;" >tmp-dum.c
2456:         $(GCC_FOR_TARGET) -S tmp-dum.c
--------------------------------------------------
 
MY SOLUTION
In file <egcs-1.1.2 source tree>/gcc/cccp.c, function main,
error (uncaught SIGSEGV) appears when program tries to close stdout.
I hope the exit handler can do this job better.
---------------patch--------------------------------------
--- egcs-1.1.2/gcc/cccp.c      Wed Jul 22 02:30:28 1998
+++ egcs-1.1.2/gcc/cccp.c      Thu Jun 24 00:00:00 1999
@@ -2292,7 +2292,7 @@
       && (ferror (pcp_outfile) || fclose (pcp_outfile) != 0))
     fatal ("I/O error on `-pcp' output");

-  if (ferror (stdout) || fclose (stdout) != 0)
+  if (ferror (stdout))
     fatal ("I/O error on output");

   if (errors)
----------------------------------------------------------
After applying this patch, egsc bulds without a problem.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]