Bug 54952 - Core dump when exception thrown if linked library compiled with older gcc
Summary: Core dump when exception thrown if linked library compiled with older gcc
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.1
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-10-23 17:31 UTC by Martin Frydl
Modified: 2007-04-18 16:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-10-23 17:34:57 UTC
Embargoed:


Attachments (Terms of Use)
Source code causing the core dumps when linked with Xerces (233 bytes, text/plain)
2001-10-23 17:34 UTC, Martin Frydl
no flags Details

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.


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