Bug 12555 - exception handling fails in code in dlopened library when base executable is linked to shared lib
Summary: exception handling fails in code in dlopened library when base executable is ...
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 3.2.3
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-09 18:48 UTC by benson margulies
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments
shell script to do the demo (195 bytes, text/plain)
2003-10-09 18:52 UTC, benson margulies
Details
test program (412 bytes, text/plain)
2003-10-09 18:52 UTC, benson margulies
Details
test library with exception usage. (199 bytes, text/plain)
2003-10-09 18:53 UTC, benson margulies
Details
header (109 bytes, text/plain)
2003-10-09 18:53 UTC, benson margulies
Details
driver that avoids the use of python in demonstrating the problem (216 bytes, text/plain)
2003-10-09 19:03 UTC, benson margulies
Details
trivial shared lib needed to trigger the explosion. (197 bytes, text/plain)
2003-10-09 19:04 UTC, benson margulies
Details

Note You need to log in before you can comment on or make changes to this bug.
Description benson margulies 2003-10-09 18:48:27 UTC
The attachments here will allow you to demonstrate the following problem.

With glibc-2.2.4-32.8 (on, as it happens, RedHat AS 2.1), if a C++ program 
dlopens a library (the example is python) and then dlopens and calls into a 
second library, and the code in the second library catches an exception and 
then throws that exception in the scope of the block, the catch fails to catch 
the exception and the program aborts.
Comment 1 benson margulies 2003-10-09 18:50:42 UTC
Hold it, the description is wrong. The python lib is attached at link time, 
not at runtime.
Comment 2 benson margulies 2003-10-09 18:52:25 UTC
Created attachment 4906 [details]
shell script to do the demo
Comment 3 benson margulies 2003-10-09 18:52:57 UTC
Created attachment 4907 [details]
test program
Comment 4 benson margulies 2003-10-09 18:53:17 UTC
Created attachment 4908 [details]
test library with exception usage.
Comment 5 benson margulies 2003-10-09 18:53:33 UTC
Created attachment 4909 [details]
header
Comment 6 benson margulies 2003-10-09 19:03:46 UTC
Created attachment 4910 [details]
driver that avoids the use of python in demonstrating the problem
Comment 7 benson margulies 2003-10-09 19:04:12 UTC
Created attachment 4911 [details]
trivial shared lib needed to trigger the explosion.
Comment 8 benson margulies 2003-10-19 23:28:49 UTC
Um, is there anything I can do?
Comment 9 benson margulies 2003-10-25 17:38:15 UTC
This only fails with glibc 2.2.4; 2.2.5 makes it work.
Comment 10 Andrew Pinski 2003-10-25 18:26:09 UTC
Not our bug then, it looks like it is glibc's bug but it is already fixed.