Changeset 295066 in webkit for trunk/Source/JavaScriptCore/jit


Ignore:
Timestamp:
May 31, 2022, 2:22:49 PM (3 years ago)
Author:
[email protected]
Message:

ASSERTION FAILED: regExp->isValid() LLIntSlowPaths.cpp(625)
https://bugs.webkit.org/show_bug.cgi?id=241107
<rdar://93369481>

Reviewed by Mark Lam.

We can remove this ASSERT(regExp->isValid()) and others like it that are used for NewRegExp
bytecode processing because subsequent code already must handle the invalid case. These code
paths may create a new RegExp or retrieve a cached RegExp. For the case where a RegExp is
created for the first time it is valid or we wouldn't have generated the NewRegExp bytecode.
This valid RegExp can subsequently be marked with an error if it fails YARR RegExp engine JIT
code or interpreter bytecode generation. Matching with a RegExp with one of these generation
errors properly throws a Syntax error. These ASSERTs fail when the NewRegExp processing
retrieves an already cached RegExp, with a generation error. The matching code will still
throw a Syntax Error.

  • JSTests/stress/regexp-late-compilation-error.js: Added.

(testRegExp1):
(testRegExp2):
(test):

  • Source/JavaScriptCore/dfg/DFGOperations.cpp:

(JSC::DFG::JSC_DEFINE_JIT_OPERATION):

  • Source/JavaScriptCore/jit/JITOperations.cpp:

(JSC::JSC_DEFINE_JIT_OPERATION):

  • Source/JavaScriptCore/llint/LLIntSlowPaths.cpp:

(JSC::LLInt::LLINT_SLOW_PATH_DECL):

Canonical link: https://commits.webkit.org/251161@main

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r293627 r295066  
    18221822
    18231823    RegExp* regexp = static_cast<RegExp*>(regexpPtr);
    1824     ASSERT(regexp->isValid());
    18251824    static constexpr bool areLegacyFeaturesEnabled = true;
    18261825    return RegExpObject::create(vm, globalObject->regExpStructure(), regexp, areLegacyFeaturesEnabled);
Note: See TracChangeset for help on using the changeset viewer.