Bug 98988 - libXt built without the -fexceptions flag
libXt built without the -fexceptions flag
Product: Red Hat Linux
Classification: Retired
Component: XFree86 (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Mike A. Harris
David Lawrence
: MoveUpstream
: 98839 (view as bug list)
Depends On:
Blocks: 98839
  Show dependency treegraph
Reported: 2003-07-11 08:48 EDT by David Juran
Modified: 2007-04-18 12:55 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-08-16 13:29:59 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description David Juran 2003-07-11 08:48:00 EDT
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

The remedy is to add the 
flag to the defines of 
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):

How reproducible:

Steps to Reproduce:
1.g++ ex11.cc -L/usr/X11R6/lib -lXm 
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 18:50:36 EDT
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 03:56:50 EDT
Created attachment 92958 [details]
test case

Here is a much simpler test case that doesn't involve anything but the X client
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 08:30:36 EDT
reported as http://bugs.xfree86.org/show_bug.cgi?id=503
Comment 4 Mike A. Harris 2003-07-16 19:20:07 EDT
Ok, thanks.  I'll follow the upstream bugzilla, and wait for their resolution,
then investigate.

Thanks again,
Comment 5 Mike A. Harris 2003-08-16 13:29:59 EDT
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 04:43:53 EDT
*** 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.