Closed
Bug 614631
Opened 15 years ago
Closed 15 years ago
Landing bug 578546 broke mingw compilation.
Categories
(Firefox Build System :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jacek, Assigned: jacek)
References
Details
Attachments
(2 files, 1 obsolete file)
|
3.92 KB,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
|
3.70 KB,
patch
|
benjamin
:
approval2.0+
|
Details | Diff | Splinter Review |
It removed |+ENABLE_CXX_EXCEPTIONS = 1| from all makefiles, but in some cases it's needed. Both modules/plugin/base/src/ and widget/src/windows really use exceptions and GCC compilation fails if exceptions are not enabled. The attached patch partially reverts the patch from bug 578546.
Attachment #493075 -
Flags: review?(jones.chris.g)
Comment 1•15 years ago
|
||
Really? A MXR search for ENABLE_CXX_EXCEPTIONS or MOZ_CPP_EXCEPTIONS doesn't show anything in either of those dirs.
... that's his point, isn't it?
Comment 3•15 years ago
|
||
Wouldn't there be ifdefs present if it were being used?
Comment 4•15 years ago
|
||
(In reply to comment #3)
> Wouldn't there be ifdefs present if it were being used?
http://mxr.mozilla.org/mozilla-central/source/config/rules.mk?mark=375-377#372
The ifdef is present in the Make compilation. And adds it to CXX Flags, and is a syntactic compilation flag. So thats why this is needed in those DIR's.
Comment 5•15 years ago
|
||
But where is MOZ_CPP_EXCEPTIONS being used?
Comment 6•15 years ago
|
||
OK, I think I get it now. It's not the MOZ_CPP_EXCEPTIONS being used but the MOZ_EXCEPTIONS_FLAGS_ON, right? If we're going to restore the ifdef, would it at least make sense to change the ifdef to one for MINGW rather than ifndef WINCE?
Is this an issue with SEH or something else?
| Assignee | ||
Comment 8•15 years ago
|
||
(In reply to comment #6)
> OK, I think I get it now. It's not the MOZ_CPP_EXCEPTIONS being used but the
> MOZ_EXCEPTIONS_FLAGS_ON, right?
Yes.
> If we're going to restore the ifdef, would it
> at least make sense to change the ifdef to one for MINGW rather than ifndef
> WINCE?
Isn't it sane to expect that we code that uses exceptions should be allowed to use MOZ_CPP_EXCEPTIONS? If it causes problems, then it should be fixed on different layer IMO. I will analyze it deeper tomorrow.
To be clear, I'm fine with defining it only for mingw, but it feels like a workaround for a deeper problem.
(In reply to comment #7)
> Is this an issue with SEH or something else?
We use standard try/catch syntax here, so although GCC won't use proper SEH for this, it can generate a proper code. The problem is parser that complains about using exceptions with -fno-exceptions flag.
Comment 9•15 years ago
|
||
try/catch or __try/__catch? They are very different. The plugin code doesn't (or shouldn't) use try/catch, only __try/__catch. And as far as I know mingw doesn't support __try/__catch anyway.
I think we're in a similar situation for widget/src/windows. We only want do SEH, not C++ exception handling.
I really don't want to reintroduce -fexceptions.
My MXR search of widget/src/windows found http://mxr.mozilla.org/mozilla-central/source/widget/src/windows/nsFilePicker.cpp#239 which is real c++ exception handling
| Assignee | ||
Comment 11•15 years ago
|
||
I guess that widget code can also be changed to use __try/__except as that what's usually done to recover from crash. The attached patch is an attempt to avoid #ifdefs on each SEH exceptions use. It addes MOZ_SEH_TRY/MOZSEH_EXCEPT macros that are defined to __try/__except or faking them based on compiler. Currently it will be turned on on msvc only, but GCC is working on SEH support and once it will be released (GCC 4.6 should have it for win64, win32 will come later).
It will also allow us to get rid of custom attempts to implement similar feature like:
http://mxr.mozilla.org/mozilla-central/source/modules/libjar/nsZipArchive.h#60
As a side effect it fixes the original bug, as these exceptions are disabled for mingw. I'm going to push it to try server.
| Assignee | ||
Comment 12•15 years ago
|
||
Compilation passed on try server.
| Assignee | ||
Updated•15 years ago
|
Attachment #493295 -
Flags: review?(khuey)
| Assignee | ||
Updated•15 years ago
|
Attachment #493075 -
Attachment is obsolete: true
Attachment #493075 -
Flags: review?(jones.chris.g)
Attachment #493295 -
Flags: review?(khuey) → review?(benjamin)
Comment 13•15 years ago
|
||
Comment on attachment 493295 [details] [diff] [review]
SEH exception based on compiler configuration
Please put the MOZ_SEH_* macros in nscore.h, not nsIException.idl. r=me with that change
Attachment #493295 -
Flags: review?(benjamin) → review+
| Assignee | ||
Comment 14•15 years ago
|
||
Thanks for the review. I've attached a fixed version.
Attachment #493943 -
Flags: approval2.0?
Updated•15 years ago
|
Attachment #493943 -
Flags: approval2.0? → approval2.0+
| Assignee | ||
Comment 15•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•