Changeset 245646 in webkit
- Timestamp:
- May 22, 2019 2:03:20 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r245645 r245646 1 2019-05-22 Zagallo <tzagallo@apple.com> 2 3 Fix validateExceptionChecks for CLoop 4 https://bugs.webkit.org/show_bug.cgi?id=191253 5 6 Reviewed by Keith Miller. 7 8 validateExceptionChecks relies on the stack position to determine if 9 an ExceptionScope was going to be handled by LLInt or JIT, but when 10 running with CLoop, it was comparing VM::topEntryFrame, which was an 11 address inside the CLoopStack to machine stack. This caused exceptions 12 to never be checked on x86 and always fail on ARM. 13 14 * runtime/CatchScope.h: 15 * runtime/ExceptionScope.h: 16 * runtime/ThrowScope.h: 17 * runtime/VM.cpp: 18 (JSC::VM::currentCLoopStackPointer const): 19 * runtime/VM.h: 20 1 21 2019-05-22 Tadeu Zagallo <tzagallo@apple.com> 2 22 -
trunk/Source/JavaScriptCore/runtime/CatchScope.h
r237042 r245646 49 49 50 50 #define DECLARE_CATCH_SCOPE(vm__) \ 51 JSC::CatchScope((vm__), JSC::ExceptionEventLocation(EXCEPTION_SCOPE_POSITION_FOR_ASAN , __FUNCTION__, __FILE__, __LINE__))51 JSC::CatchScope((vm__), JSC::ExceptionEventLocation(EXCEPTION_SCOPE_POSITION_FOR_ASAN(vm__), __FUNCTION__, __FILE__, __LINE__)) 52 52 53 53 #else // not ENABLE(EXCEPTION_SCOPE_VERIFICATION) -
trunk/Source/JavaScriptCore/runtime/ExceptionScope.h
r237042 r245646 39 39 #define EXCEPTION_ASSERT_WITH_MESSAGE(assertion, message) RELEASE_ASSERT_WITH_MESSAGE(assertion, message) 40 40 41 #if ASAN_ENABLED && COMPILER(GCC_COMPATIBLE) 42 #define EXCEPTION_SCOPE_POSITION_FOR_ASAN currentStackPointer() 41 #if ENABLE(C_LOOP) 42 #define EXCEPTION_SCOPE_POSITION_FOR_ASAN(vm__) (vm__).currentCLoopStackPointer() 43 #elif ASAN_ENABLED && COMPILER(GCC_COMPATIBLE) 44 #define EXCEPTION_SCOPE_POSITION_FOR_ASAN(vm__) currentStackPointer() 43 45 #else 44 #define EXCEPTION_SCOPE_POSITION_FOR_ASAN nullptr46 #define EXCEPTION_SCOPE_POSITION_FOR_ASAN(vm__) nullptr 45 47 #endif 46 48 … … 54 56 ALWAYS_INLINE void releaseAssertNoException() { RELEASE_ASSERT_WITH_MESSAGE(!exception(), "%s", unexpectedExceptionMessage().data()); } 55 57 56 #if ASAN_ENABLED 58 #if ASAN_ENABLED || ENABLE(C_LOOP) 57 59 const void* stackPosition() const { return m_location.stackPosition; } 58 60 #else -
trunk/Source/JavaScriptCore/runtime/ThrowScope.h
r242596 r245646 63 63 64 64 #define DECLARE_THROW_SCOPE(vm__) \ 65 JSC::ThrowScope((vm__), JSC::ExceptionEventLocation(EXCEPTION_SCOPE_POSITION_FOR_ASAN , __FUNCTION__, __FILE__, __LINE__))65 JSC::ThrowScope((vm__), JSC::ExceptionEventLocation(EXCEPTION_SCOPE_POSITION_FOR_ASAN(vm__), __FUNCTION__, __FILE__, __LINE__)) 66 66 67 67 #define throwScopePrintIfNeedCheck(scope__) \ -
trunk/Source/JavaScriptCore/runtime/VM.cpp
r244764 r245646 1149 1149 return interpreter->cloopStack().isSafeToRecurse(); 1150 1150 } 1151 1152 void* VM::currentCLoopStackPointer() const 1153 { 1154 return interpreter->cloopStack().currentStackPointer(); 1155 } 1151 1156 #endif // ENABLE(C_LOOP) 1152 1157 -
trunk/Source/JavaScriptCore/runtime/VM.h
r245586 r245646 731 731 void* cloopStackLimit() { return m_cloopStackLimit; } 732 732 void setCLoopStackLimit(void* limit) { m_cloopStackLimit = limit; } 733 JS_EXPORT_PRIVATE void* currentCLoopStackPointer() const; 733 734 #endif 734 735
Note: See TracChangeset
for help on using the changeset viewer.