Bug 54952

Summary: Core dump when exception thrown if linked library compiled with older gcc
Product: [Retired] Red Hat Linux Reporter: Martin Frydl <martin>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-10-23 17:34:57 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:
Attachments:
Description Flags
Source code causing the core dumps when linked with Xerces none

Description Martin Frydl 2001-10-23 17:31:14 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.5 i686)

Description of problem:
I have a simple program throwing and catching the exception. Alone it works
fine, but when I link it with Xerces-C++ library it dumps core. The program
itself in fact does not need the library.

I use precompiled Xerces 1.5.1 from
http://xml.apache.org/dist/xerces-c/stable/ It was compiled on RedHat 6.1
with egcs-2.91.66 and glibc-2.1.2-11 (from Xerces-C++ FAQ on
xml.apache.org/xerces-c)

I do this:
Works:
	gcc -o test test.cpp
Compiles, but segfaults when run:
	gcc -o test test.cpp -lxerces-c1_5_1

I'm using gcc-2.96-85 from latest updates.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Compile using gcc -o test test.cpp -lxerces-c1_5_1
2.Run it
	

Additional info:

Comment 1 Martin Frydl 2001-10-23 17:34:53 UTC
Created attachment 34763 [details]
Source code causing the core dumps when linked with Xerces

Comment 2 Jakub Jelinek 2001-11-12 14:11:49 UTC
You cannot mix code compiled with different C++ compilers.
Either all libs and main program have to be compiled with egcs 1.1.x, or
gcc 2.95.x, or 2.96-RH, or 3.0, or 3.1, no mixing is possible.