Bug 64809

Summary: C++ exception handler segfaults
Product: [Retired] Red Hat Linux Reporter: Matthew Saltzman <mjs>
Component: libstdc++Assignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2   
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: 2002-12-15 20:16:31 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
Example code illustrating bug none

Description Matthew Saltzman 2002-05-13 02:54:56 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020408

Description of problem:
Throwing user-defined exception causes segfault.

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


How reproducible:
Always

Steps to Reproduce:
1. Unpack attached example and cd into directory.
2. make
3. make unitTest
4. ./Linux-g/unitTest
	

Actual Results:  Prints:

Testing OsiPackedMatrix
Segmentation fault

DDD reports:
Program received signal SIGSEGV, Segmentation fault.
0x400bb459 in __cp_pop_exception (p=0x400bb38c) from
/usr/lib/libstdc++-libc6.2-2.so.3



Expected Results:  Shoud print:

Testing OsiPackedMatrix
Error Thrown: 1



Additional info:

By "always reproducible, I mean with the attached code, not with any code.

The attached example contains a fairly large amount of code.  The execution path
is actually quite short, however this bug seems to be highly location-dependent.
 Deleting any of the other object files that are included causes the bug to not
be exercised.

The problem occurs with gcc-c++-2.96-98. The Valhalla compiler gcc-c++-2.96-110
does not exhibit the problem on this code, however I did not see any indication
that a problem like this was fixed.  gcc-2.95.3 also does not exhibit the
problem.  It is possible that other differences in these compilers move things
around so that the bug is simply not exercised.

Comment 1 Matthew Saltzman 2002-05-13 02:57:23 UTC
Created attachment 57024 [details]
Example code illustrating bug

Comment 2 Alan Cox 2002-12-15 20:16:31 UTC
Verified ok with 3.2 on 8.0