Last Comment Bug 670686 - jscrashreport.cpp fails to compile on mingw
: jscrashreport.cpp fails to compile on mingw
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: x86 Windows 7
: -- normal (vote)
: mozilla8
Assigned To: Jacek Caban
:
Mentors:
Depends on:
Blocks: 662646
  Show dependency treegraph
 
Reported: 2011-07-11 09:48 PDT by Jacek Caban
Modified: 2011-07-12 11:33 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
fix v1.0 (1.50 KB, patch)
2011-07-11 09:48 PDT, Jacek Caban
no flags Details | Diff | Splinter Review
fix with inline GCC assembly (1.54 KB, patch)
2011-07-11 11:00 PDT, Jacek Caban
no flags Details | Diff | Splinter Review
fix without support for win2k in mingw builds (1.72 KB, patch)
2011-07-11 11:00 PDT, Jacek Caban
wmccloskey: review+
Details | Diff | Splinter Review

Description Jacek Caban 2011-07-11 09:48:55 PDT
Created attachment 545193 [details] [diff] [review]
fix v1.0

It's mostly due to using MS-style inline assembly. I could add ifdefed GCC assembly, but I think it's cleaner to use the existing solution for win64 and call RtlCaptureContext.

I've also changed case in windows.h include to fix cross compiling on case sensitive OSes.
Comment 1 Bill McCloskey (:billm) 2011-07-11 10:05:33 PDT
Thanks for the patch. Unfortunately, I just found out on #developers that we still nominally support Windows 2000, where RtlCaptureContext is unavailable. Is there some other way to do this?
Comment 2 Jacek Caban 2011-07-11 11:00:04 PDT
Created attachment 545213 [details] [diff] [review]
fix with inline GCC assembly
Comment 3 Jacek Caban 2011-07-11 11:00:43 PDT
Created attachment 545214 [details] [diff] [review]
fix without support for win2k in mingw builds
Comment 4 Jacek Caban 2011-07-11 11:04:36 PDT
Thanks for quick review. I've attached two versions of the fix that will keep support for win2k. The first version is just a port of existing assembly code to GCC. The second version is my previous approach, ifdefed so that MSC builds will still use assembly code. I think it's fine to not support win2k in mingw builds (I'd expect it to be already broken). Also this way, once we'll drop win2k support, we can just remove _MSC_VER ifdef and use the new code for MSC as well. I will the choice for you.
Comment 5 Bill McCloskey (:billm) 2011-07-11 11:08:36 PDT
Comment on attachment 545214 [details] [diff] [review]
fix without support for win2k in mingw builds

Review of attachment 545214 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks again. I like this one better.
Comment 6 Jacek Caban 2011-07-12 02:25:19 PDT
Pushed to m-i:

http://hg.mozilla.org/integration/mozilla-inbound/rev/126abe6c099a

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