Bug 1138205 - use a reinterpret_cast instead of a static_cast after bug 986981, fixes build on OpenBSD/amd64. r=sunfish
authorLandry Breuil <landry@openbsd.org>
Sun, 01 Mar 2015 23:58:00 +0100
changeset 246984 4556f3a41b022bfcafcf368c9cba788b25dca09b
parent 246983 f7aee53b910f89ec246c03e90b9566889e4b72c8
child 246985 12b808411eda6e16016f1cb9af6cf5ccc2238833
push id884
push userdburns@mozilla.com
push dateTue, 03 Mar 2015 15:29:12 +0000
reviewerssunfish
bugs1138205, 986981
milestone39.0a1
Bug 1138205 - use a reinterpret_cast instead of a static_cast after bug 986981, fixes build on OpenBSD/amd64. r=sunfish
js/src/asmjs/AsmJSSignalHandlers.cpp
--- a/js/src/asmjs/AsmJSSignalHandlers.cpp
+++ b/js/src/asmjs/AsmJSSignalHandlers.cpp
@@ -1098,17 +1098,17 @@ HandleFault(int signum, siginfo_t *info,
 
     const AsmJSModule &module = activation->module();
     if (!module.containsFunctionPC(pc))
         return false;
 
 # if defined(JS_CODEGEN_X64)
     // These checks aren't necessary, but, since we can, check anyway to make
     // sure we aren't covering up a real bug.
-    uint8_t *faultingAddress = static_cast<uint8_t *>(info->si_addr);
+    uint8_t *faultingAddress = reinterpret_cast<uint8_t *>(info->si_addr);
     if (!module.maybeHeap() ||
         faultingAddress < module.maybeHeap() ||
         faultingAddress >= module.maybeHeap() + AsmJSMappedSize)
     {
         return false;
     }
 
     const AsmJSHeapAccess *heapAccess = module.lookupHeapAccess(pc);