REGRESSION(r237547): Exception handlers should be aware of wide opcodes when JIT...
authortzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Nov 2018 10:46:34 +0000 (10:46 +0000)
committertzagallo@apple.com <tzagallo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Nov 2018 10:46:34 +0000 (10:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191175

Reviewed by Keith Miller.

https://bugs.webkit.org/show_bug.cgi?id=191108 did not handle the case where JIT is not enabled

* jit/JITExceptions.cpp:
(JSC::genericUnwind):
* llint/LLIntData.h:
(JSC::LLInt::getWideCodePtr):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237728 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/jit/JITExceptions.cpp
Source/JavaScriptCore/llint/LLIntData.h

index dfb9725..f6b2b0a 100644 (file)
@@ -1,3 +1,17 @@
+2018-11-02  Tadeu Zagallo  <tzagallo@apple.com>
+
+        REGRESSION(r237547): Exception handlers should be aware of wide opcodes when JIT is disabled
+        https://bugs.webkit.org/show_bug.cgi?id=191175
+
+        Reviewed by Keith Miller.
+
+        https://bugs.webkit.org/show_bug.cgi?id=191108 did not handle the case where JIT is not enabled
+
+        * jit/JITExceptions.cpp:
+        (JSC::genericUnwind):
+        * llint/LLIntData.h:
+        (JSC::LLInt::getWideCodePtr):
+
 2018-11-01  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         Rename <wtf/unicode/UTF8.h> to <wtf/unicode/UTF8Conversion.h> in order to avoid conflicting with ICU's unicode/utf8.h
index 9c2c5f3..3aaa87f 100644 (file)
@@ -73,7 +73,9 @@ void genericUnwind(VM* vm, ExecState* callFrame)
 #if ENABLE(JIT)
         catchRoutine = handler->nativeCode.executableAddress();
 #else
-        catchRoutine = LLInt::getCodePtr(catchPCForInterpreter->opcodeID());
+        catchRoutine = catchPCForInterpreter->isWide()
+            ? LLInt::getWideCodePtr(catchPCForInterpreter->opcodeID())
+            : LLInt::getCodePtr(catchPCForInterpreter->opcodeID());
 #endif
     } else
         catchRoutine = LLInt::getCodePtr<ExceptionHandlerPtrTag>(handleUncaughtException).executableAddress();
index e25f3e2..b248abc 100644 (file)
@@ -140,6 +140,11 @@ ALWAYS_INLINE void* getCodePtr(OpcodeID id)
 {
     return reinterpret_cast<void*>(getOpcode(id));
 }
+
+ALWAYS_INLINE void* getWideCodePtr(OpcodeID id)
+{
+    return reinterpret_cast<void*>(getOpcodeWide(id));
+}
 #endif
 
 ALWAYS_INLINE void* getCodePtr(JSC::EncodedJSValue glueHelper())