Closed Bug 1101032 Opened 5 years ago Closed 5 years ago

Fix ExecutableAllocatorWin.cpp compilation on mingw64.

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: jacek, Assigned: jacek)

Details

Attachments

(1 file)

Attached patch fixSplinter Review
GCC for win64 doesn't allow function pointer to pointer casts. My patch uses uintptr_t instead.
Attachment #8524698 - Flags: review?(luke)
Comment on attachment 8524698 [details] [diff] [review]
fix

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

::: js/src/jit/ExecutableAllocatorWin.cpp
@@ +158,5 @@
>  
>      // mov imm64, rax
>      r->thunk[0]  = 0x48;
>      r->thunk[1]  = 0xb8;
> +    uintptr_t handler = reinterpret_cast<uintptr_t>(&ExceptionHandler);

Thanks for catching this.  The usual cast we use for this is JS_FUNC_TO_DATA_PTR; could you use that?
Attachment #8524698 - Flags: review?(luke) → review+
Thanks for review. Pushed with JS_FUNC_TO_DATA_PTR.

https://hg.mozilla.org/integration/mozilla-inbound/rev/b036339d4869
https://hg.mozilla.org/mozilla-central/rev/b036339d4869
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.