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):
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.
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.
Created attachment 92958 [details]
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.
reported as http://bugs.xfree86.org/show_bug.cgi?id=503
Ok, thanks. I'll follow the upstream bugzilla, and wait for their resolution,
Upstream has determined that this is not a safe change to make, and closed
the upstream report WONTFIX.
Closing bug as WONTFIX.
*** Bug 98839 has been marked as a duplicate of this bug. ***