WebKit Bugzilla
Attachment 370436 Details for
Bug 191253
: Fix validateExceptionChecks for CLoop
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-191253-20190522221028.patch (text/plain), 5.13 KB, created by
Tadeu Zagallo
on 2019-05-22 13:10:30 PDT
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Tadeu Zagallo
Created:
2019-05-22 13:10:30 PDT
Size:
5.13 KB
patch
obsolete
>Subversion Revision: 245639 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 9fef9c938ab889187472ad5ea2930c7e587e444f..391d156c5e794705626b6375ec5c2d3f2e57eb3e 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,23 @@ >+2019-05-22 Zagallo <tzagallo@apple.com> >+ >+ Fix validateExceptionChecks for CLoop >+ https://bugs.webkit.org/show_bug.cgi?id=191253 >+ >+ Reviewed by Keith Miller. >+ >+ validateExceptionChecks relies on the stack position to determine if >+ an ExceptionScope was going to be handled by LLInt or JIT, but when >+ running with CLoop, it was comparing VM::topEntryFrame, which was an >+ address inside the CLoopStack to machine stack. This caused exceptions >+ to never be checked on x86 and always fail on ARM. >+ >+ * runtime/CatchScope.h: >+ * runtime/ExceptionScope.h: >+ * runtime/ThrowScope.h: >+ * runtime/VM.cpp: >+ (JSC::VM::currentCLoopStackPointer const): >+ * runtime/VM.h: >+ > 2019-05-22 Ross Kirsling <ross.kirsling@sony.com> > > [ESNext] Implement support for Numeric Separators >diff --git a/Source/JavaScriptCore/runtime/CatchScope.h b/Source/JavaScriptCore/runtime/CatchScope.h >index 71e62a83fdd8ab2dde6ba8181204e84ae8f62d24..57777962e3843fa491a9787b1e80f2acd8eba8ca 100644 >--- a/Source/JavaScriptCore/runtime/CatchScope.h >+++ b/Source/JavaScriptCore/runtime/CatchScope.h >@@ -48,7 +48,7 @@ public: > }; > > #define DECLARE_CATCH_SCOPE(vm__) \ >- JSC::CatchScope((vm__), JSC::ExceptionEventLocation(EXCEPTION_SCOPE_POSITION_FOR_ASAN, __FUNCTION__, __FILE__, __LINE__)) >+ JSC::CatchScope((vm__), JSC::ExceptionEventLocation(EXCEPTION_SCOPE_POSITION_FOR_ASAN(vm__), __FUNCTION__, __FILE__, __LINE__)) > > #else // not ENABLE(EXCEPTION_SCOPE_VERIFICATION) > >diff --git a/Source/JavaScriptCore/runtime/ExceptionScope.h b/Source/JavaScriptCore/runtime/ExceptionScope.h >index 52a639638aef4227aa4bc02b52a38f4727a80293..55e4107e13f9593617ec250b4b261346e754d428 100644 >--- a/Source/JavaScriptCore/runtime/ExceptionScope.h >+++ b/Source/JavaScriptCore/runtime/ExceptionScope.h >@@ -38,10 +38,12 @@ class Exception; > #define EXCEPTION_ASSERT_UNUSED(variable, assertion) RELEASE_ASSERT(assertion) > #define EXCEPTION_ASSERT_WITH_MESSAGE(assertion, message) RELEASE_ASSERT_WITH_MESSAGE(assertion, message) > >-#if ASAN_ENABLED && COMPILER(GCC_COMPATIBLE) >-#define EXCEPTION_SCOPE_POSITION_FOR_ASAN currentStackPointer() >+#if ENABLE(C_LOOP) >+#define EXCEPTION_SCOPE_POSITION_FOR_ASAN(vm__) (vm__).currentCLoopStackPointer() >+#elif ASAN_ENABLED && COMPILER(GCC_COMPATIBLE) >+#define EXCEPTION_SCOPE_POSITION_FOR_ASAN(vm__) currentStackPointer() > #else >-#define EXCEPTION_SCOPE_POSITION_FOR_ASAN nullptr >+#define EXCEPTION_SCOPE_POSITION_FOR_ASAN(vm__) nullptr > #endif > > class ExceptionScope { >@@ -53,7 +55,7 @@ public: > ALWAYS_INLINE void assertNoException() { RELEASE_ASSERT_WITH_MESSAGE(!exception(), "%s", unexpectedExceptionMessage().data()); } > ALWAYS_INLINE void releaseAssertNoException() { RELEASE_ASSERT_WITH_MESSAGE(!exception(), "%s", unexpectedExceptionMessage().data()); } > >-#if ASAN_ENABLED >+#if ASAN_ENABLED || ENABLE(C_LOOP) > const void* stackPosition() const { return m_location.stackPosition; } > #else > const void* stackPosition() const { return this; } >diff --git a/Source/JavaScriptCore/runtime/ThrowScope.h b/Source/JavaScriptCore/runtime/ThrowScope.h >index e12bbe09da4009f3c483a6ab210602b16590ca14..55355d6961ed8c4424b0eb7de85bc590d62eea6b 100644 >--- a/Source/JavaScriptCore/runtime/ThrowScope.h >+++ b/Source/JavaScriptCore/runtime/ThrowScope.h >@@ -62,7 +62,7 @@ private: > }; > > #define DECLARE_THROW_SCOPE(vm__) \ >- JSC::ThrowScope((vm__), JSC::ExceptionEventLocation(EXCEPTION_SCOPE_POSITION_FOR_ASAN, __FUNCTION__, __FILE__, __LINE__)) >+ JSC::ThrowScope((vm__), JSC::ExceptionEventLocation(EXCEPTION_SCOPE_POSITION_FOR_ASAN(vm__), __FUNCTION__, __FILE__, __LINE__)) > > #define throwScopePrintIfNeedCheck(scope__) \ > scope__.printIfNeedCheck(__FUNCTION__, __FILE__, __LINE__) >diff --git a/Source/JavaScriptCore/runtime/VM.cpp b/Source/JavaScriptCore/runtime/VM.cpp >index a630116cc2ca027404b00180f0a6549a8674ec8b..2b06a3bed934c588df87fc9f859222d8670e4e50 100644 >--- a/Source/JavaScriptCore/runtime/VM.cpp >+++ b/Source/JavaScriptCore/runtime/VM.cpp >@@ -1148,6 +1148,11 @@ bool VM::isSafeToRecurseSoftCLoop() const > { > return interpreter->cloopStack().isSafeToRecurse(); > } >+ >+void* VM::currentCLoopStackPointer() const >+{ >+ return interpreter->cloopStack().currentStackPointer(); >+} > #endif // ENABLE(C_LOOP) > > #if ENABLE(EXCEPTION_SCOPE_VERIFICATION) >diff --git a/Source/JavaScriptCore/runtime/VM.h b/Source/JavaScriptCore/runtime/VM.h >index 501a37d6c2034f35ffcf90bb62ff334f3f0596f6..3af48797b7bd405e491c7f87b62e1a5a9923f18a 100644 >--- a/Source/JavaScriptCore/runtime/VM.h >+++ b/Source/JavaScriptCore/runtime/VM.h >@@ -730,6 +730,7 @@ public: > #if ENABLE(C_LOOP) > void* cloopStackLimit() { return m_cloopStackLimit; } > void setCLoopStackLimit(void* limit) { m_cloopStackLimit = limit; } >+ JS_EXPORT_PRIVATE void* currentCLoopStackPointer() const; > #endif > > inline bool isSafeToRecurseSoft() const;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 191253
:
353840
|
353893
| 370436