Changeset 245815 in webkit
- Timestamp:
- May 28, 2019 10:19:09 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JSTests/ChangeLog
r245813 r245815 1 2019-05-28 Michael Saboff <msaboff@apple.com> 2 3 [YARR] Properly handle RegExp's that require large ParenContext space 4 https://bugs.webkit.org/show_bug.cgi?id=198065 5 6 Reviewed by Keith Miller. 7 8 New test. 9 10 * stress/regexp-large-paren-context.js: Added. 11 (testLargeRegExp): 12 1 13 2019-05-28 Tadeu Zagallo <tzagallo@apple.com> 2 14 -
trunk/Source/JavaScriptCore/ChangeLog
r245813 r245815 1 2019-05-28 Michael Saboff <msaboff@apple.com> 2 3 [YARR] Properly handle RegExp's that require large ParenContext space 4 https://bugs.webkit.org/show_bug.cgi?id=198065 5 6 Reviewed by Keith Miller. 7 8 Changed what happens when we exceed VM::patternContextBufferSize when compiling a RegExp 9 that needs ParenCOntextSpace to fail the RegExp JIT compilation and fall back to the YARR 10 interpreter. This can save large amounts of JIT memory for a 11 JIT'ed function that cannot ever succeed. 12 13 * yarr/YarrJIT.cpp: 14 (JSC::Yarr::YarrGenerator::initParenContextFreeList): 15 (JSC::Yarr::YarrGenerator::compile): 16 1 17 2019-05-28 Tadeu Zagallo <tzagallo@apple.com> 2 18 -
trunk/Source/JavaScriptCore/yarr/YarrJIT.cpp
r245586 r245815 229 229 parenContextSize = WTF::roundUpToMultipleOf<sizeof(uintptr_t)>(parenContextSize); 230 230 231 // Check that the paren context is a reasonable size. 232 if (parenContextSize > VM::patternContextBufferSize) 233 m_abortExecution.append(jump()); 231 if (parenContextSize > VM::patternContextBufferSize) { 232 m_failureReason = JITFailureReason::ParenthesisNestedTooDeep; 233 return; 234 } 234 235 235 236 Jump emptyFreeList = branchTestPtr(Zero, freelistRegister); … … 3936 3937 3937 3938 #if ENABLE(YARR_JIT_ALL_PARENS_EXPRESSIONS) 3938 if (m_containsNestedSubpatterns) 3939 if (m_containsNestedSubpatterns) { 3939 3940 initParenContextFreeList(); 3941 if (m_failureReason) { 3942 codeBlock.setFallBackWithFailureReason(*m_failureReason); 3943 return; 3944 } 3945 } 3940 3946 #endif 3941 3947
Note: See TracChangeset
for help on using the changeset viewer.