RESOLVED FIXED Bug 224565
Defer TerminationExceptions when evaluating ASSERT in HashMapIml::addNormalized().
https://bugs.webkit.org/show_bug.cgi?id=224565
Summary Defer TerminationExceptions when evaluating ASSERT in HashMapIml::addNormaliz...
Mark Lam
Reported 2021-04-14 11:31:40 PDT
Attachments
proposed patch. (8.79 KB, patch)
2021-04-14 11:49 PDT, Mark Lam
no flags
proposed patch. (9.16 KB, patch)
2021-04-14 14:24 PDT, Mark Lam
ysuzuki: review+
Mark Lam
Comment 1 2021-04-14 11:49:05 PDT
Created attachment 426026 [details] proposed patch.
Yusuke Suzuki
Comment 2 2021-04-14 12:20:41 PDT
Comment on attachment 426026 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=426026&action=review > Source/JavaScriptCore/runtime/ExceptionHelpers.h:72 > +#define DEFER_TERMINATION_AND_ASSERT(vm, assertion, ...) do { \ > + JSC::DeferTerminationForAWhile deferScope(vm); \ > + ASSERT(assertion, __VA_ARGS__); \ > + } while (false) > + > +#define DEFER_TERMINATION_AND_ASSERT_WITH_MESSAGE(vm, assertion, ...) do { \ > + JSC::DeferTerminationForAWhile deferScope(vm); \ > + ASSERT_WITH_MESSAGE(assertion, __VA_ARGS__); \ > + } while (false) Let's make them nop for Release builds. JSC::DeferTerminationForAWhile is calling deferTermination / undoDeferTermination functions. And I think addNormalized is really critical enough so that we should not insert these calls.
Mark Lam
Comment 3 2021-04-14 14:24:11 PDT
Created attachment 426046 [details] proposed patch.
Yusuke Suzuki
Comment 4 2021-04-14 14:28:32 PDT
Comment on attachment 426046 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=426046&action=review r=me > Source/JavaScriptCore/runtime/VMTraps.h:194 > + enum DeferAction { Let’s use enum class.
Mark Lam
Comment 5 2021-04-14 14:53:04 PDT
Thanks for the review. I've made the enum class change. Landed in r275969: <http://trac.webkit.org/r275969>.
Note You need to log in before you can comment on or make changes to this bug.