Bug 98988 - libXt built without the -fexceptions flag
Summary: libXt built without the -fexceptions flag
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: XFree86
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact: David Lawrence
URL:
Whiteboard:
: 98839 (view as bug list)
Depends On:
Blocks: 98839
TreeView+ depends on / blocked
 
Reported: 2003-07-11 12:48 UTC by David Juran
Modified: 2007-04-18 16:55 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-08-16 17:29:59 UTC
Embargoed:


Attachments (Terms of Use)
test case (409 bytes, text/plain)
2003-07-16 07:56 UTC, David Juran
no flags Details

Description David Juran 2003-07-11 12:48:00 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314

Description of problem:
XFree86 is built using gcc without using the -fexceptions flag . If Xlibs are
now used from C++ programs and functions which throws exceptions are registered
as callback-functions, those exceptions aren't cought.
There is a test case for this  in
https://bugzilla.redhat.com/bugzilla/attachment.cgi?id=92831&action=view

The remedy is to add the 
-fexceptions
flag to the defines of 
BootstrapCFlags
DefaultGcc2i386Opt
DefaultGcc2AxpOpt
DefaultGcc2PpcOpt
DefaultGcc2x86_64Opt
on line 1108 - 1113 of XFree86.spec

I'm not sure though how much overhead this adds. It would probably be sufficient
to add this flag while building the X libs, and in this specific case, it would
be enough to just use it while building xc/libs/Xt

Do note that the same problem exists in Redhat 9 as well.

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

How reproducible:
Always

Steps to Reproduce:
1.g++ ex11.cc -L/usr/X11R6/lib -lXm 
2.a.out
3.press the button in the widget
    

Actual Results:  Exceptption was not cought and prgram aborted



Expected Results:  The exception should have been cought.

Additional info:

Comment 1 Mike A. Harris 2003-07-11 22:50:36 UTC
If this really is a bug and needs to be fixed, I'm kindof surprised that
it has never been reported by anyone before in all the years that XFree86
has been shipped.  Moreso, if it is a problem, it is not just a Red Hat
problem, it would be an XFree86 problem.  Since the implications of making
such a change are not known or clear, I'm unwilling to make such a change
to Red Hat XFree86 packages unless upstream XFree86 modifies the default
compiler flags as well to make this the default.

Please report this upstream to XFree86.org directly at http://bugs.xfree86.org
and provide the upstream bug URL here and I will monitor XFree86.org's response
to the issue.

Comment 2 David Juran 2003-07-16 07:56:50 UTC
Created attachment 92958 [details]
test case

Here is a much simpler test case that doesn't involve anything but the X client
libraries.
compile it with 
g++ -Wall -L/usr/X11R6/lib -lXt ./test.cc
and then when running it, it will exit with abort.
If it is linked against a libXt compiled with the -fexceptions flag, it will
catch the exception.

Comment 3 David Juran 2003-07-16 12:30:36 UTC
reported as http://bugs.xfree86.org/show_bug.cgi?id=503

Comment 4 Mike A. Harris 2003-07-16 23:20:07 UTC
Ok, thanks.  I'll follow the upstream bugzilla, and wait for their resolution,
then investigate.

Thanks again,
TTYL

Comment 5 Mike A. Harris 2003-08-16 17:29:59 UTC
Upstream has determined that this is not a safe change to make, and closed
the upstream report WONTFIX.

Closing bug as WONTFIX.

Comment 6 Thomas Woerner 2003-08-18 08:43:53 UTC
*** Bug 98839 has been marked as a duplicate of this bug. ***


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