Changeset 245928 in webkit
- Timestamp:
- May 30, 2019, 5:30:23 PM (7 years ago)
- Location:
- branches/safari-607-branch
- Files:
-
- 1 added
- 3 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/regexp-large-paren-context.js (added)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/yarr/YarrJIT.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-607-branch/JSTests/ChangeLog
r245926 r245928 1 2019-05-30 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r245815. rdar://problem/51264876 4 5 [YARR] Properly handle RegExp's that require large ParenContext space 6 https://bugs.webkit.org/show_bug.cgi?id=198065 7 8 Reviewed by Keith Miller. 9 10 JSTests: 11 12 New test. 13 14 * stress/regexp-large-paren-context.js: Added. 15 (testLargeRegExp): 16 17 Source/JavaScriptCore: 18 19 Changed what happens when we exceed VM::patternContextBufferSize when compiling a RegExp 20 that needs ParenCOntextSpace to fail the RegExp JIT compilation and fall back to the YARR 21 interpreter. This can save large amounts of JIT memory for a 22 JIT'ed function that cannot ever succeed. 23 24 * yarr/YarrJIT.cpp: 25 (JSC::Yarr::YarrGenerator::initParenContextFreeList): 26 (JSC::Yarr::YarrGenerator::compile): 27 28 29 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245815 268f45cc-cd09-0410-ab3c-d52691b4dbfc 30 31 2019-05-28 Michael Saboff <msaboff@apple.com> 32 33 [YARR] Properly handle RegExp's that require large ParenContext space 34 https://bugs.webkit.org/show_bug.cgi?id=198065 35 36 Reviewed by Keith Miller. 37 38 New test. 39 40 * stress/regexp-large-paren-context.js: Added. 41 (testLargeRegExp): 42 1 43 2019-05-30 Kocsen Chung <kocsen_chung@apple.com> 2 44 -
branches/safari-607-branch/Source/JavaScriptCore/ChangeLog
r245926 r245928 1 2019-05-30 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r245815. rdar://problem/51264876 4 5 [YARR] Properly handle RegExp's that require large ParenContext space 6 https://bugs.webkit.org/show_bug.cgi?id=198065 7 8 Reviewed by Keith Miller. 9 10 JSTests: 11 12 New test. 13 14 * stress/regexp-large-paren-context.js: Added. 15 (testLargeRegExp): 16 17 Source/JavaScriptCore: 18 19 Changed what happens when we exceed VM::patternContextBufferSize when compiling a RegExp 20 that needs ParenCOntextSpace to fail the RegExp JIT compilation and fall back to the YARR 21 interpreter. This can save large amounts of JIT memory for a 22 JIT'ed function that cannot ever succeed. 23 24 * yarr/YarrJIT.cpp: 25 (JSC::Yarr::YarrGenerator::initParenContextFreeList): 26 (JSC::Yarr::YarrGenerator::compile): 27 28 29 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245815 268f45cc-cd09-0410-ab3c-d52691b4dbfc 30 31 2019-05-28 Michael Saboff <msaboff@apple.com> 32 33 [YARR] Properly handle RegExp's that require large ParenContext space 34 https://bugs.webkit.org/show_bug.cgi?id=198065 35 36 Reviewed by Keith Miller. 37 38 Changed what happens when we exceed VM::patternContextBufferSize when compiling a RegExp 39 that needs ParenCOntextSpace to fail the RegExp JIT compilation and fall back to the YARR 40 interpreter. This can save large amounts of JIT memory for a 41 JIT'ed function that cannot ever succeed. 42 43 * yarr/YarrJIT.cpp: 44 (JSC::Yarr::YarrGenerator::initParenContextFreeList): 45 (JSC::Yarr::YarrGenerator::compile): 46 1 47 2019-05-30 Kocsen Chung <kocsen_chung@apple.com> 2 48 -
branches/safari-607-branch/Source/JavaScriptCore/yarr/YarrJIT.cpp
r245926 r245928 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); … … 3873 3874 3874 3875 #if ENABLE(YARR_JIT_ALL_PARENS_EXPRESSIONS) 3875 if (m_containsNestedSubpatterns) 3876 if (m_containsNestedSubpatterns) { 3876 3877 initParenContextFreeList(); 3878 if (m_failureReason) { 3879 codeBlock.setFallBackWithFailureReason(*m_failureReason); 3880 return; 3881 } 3882 } 3877 3883 #endif 3878 3884
Note:
See TracChangeset
for help on using the changeset viewer.