⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 185770 in webkit


Ignore:
Timestamp:
Jun 19, 2015, 3:03:06 PM (11 years ago)
Author:
ggaren@apple.com
Message:

WebKit crash while loading nytimes at JavaScriptCore: JSC::ExecutableAllocator::allocate + 276
https://bugs.webkit.org/show_bug.cgi?id=146163
<rdar://problem/20392986>

Reviewed by Michael Saboff.

There's no good way to test this in our test harness because we don't
have a way to simulate executable memory pressure, and doing so would
cause the cases that still use JITCompilationMustSucceed to crash.

Instead, I tested by manually forcing all regexp JIT compilation to
fail and running the JavaScriptCore tests.

  • yarr/YarrJIT.cpp:

(JSC::Yarr::YarrGenerator::compile): Allow compilation to fail. We can
fall back to the regexp interpreter if we need to.

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r185768 r185770  
     12015-06-19  Geoffrey Garen  <ggaren@apple.com>
     2
     3        WebKit crash while loading nytimes at JavaScriptCore: JSC::ExecutableAllocator::allocate + 276
     4        https://bugs.webkit.org/show_bug.cgi?id=146163
     5        <rdar://problem/20392986>
     6
     7        Reviewed by Michael Saboff.
     8
     9        There's no good way to test this in our test harness because we don't
     10        have a way to simulate executable memory pressure, and doing so would
     11        cause the cases that still use JITCompilationMustSucceed to crash.
     12
     13        Instead, I tested by manually forcing all regexp JIT compilation to
     14        fail and running the JavaScriptCore tests.
     15
     16        * yarr/YarrJIT.cpp:
     17        (JSC::Yarr::YarrGenerator::compile): Allow compilation to fail. We can
     18        fall back to the regexp interpreter if we need to.
     19
    1202015-06-19  Mark Lam  <mark.lam@apple.com>
    221
  • trunk/Source/JavaScriptCore/yarr/YarrJIT.cpp

    r177820 r185770  
    26442644        initCallFrame();
    26452645
    2646         // Compile the pattern to the internal 'YarrOp' representation.
    26472646        opCompileBody(m_pattern.m_body);
    26482647
    2649         // If we encountered anything we can't handle in the JIT code
    2650         // (e.g. backreferences) then return early.
    26512648        if (m_shouldFallBack) {
    26522649            jitObject.setFallBack(true);
     
    26572654        backtrack();
    26582655
    2659         // Link & finalize the code.
    2660         LinkBuffer linkBuffer(*vm, *this, REGEXP_CODE_ID);
     2656        LinkBuffer linkBuffer(*vm, *this, REGEXP_CODE_ID, JITCompilationCanFail);
     2657        if (linkBuffer.didFailToAllocate()) {
     2658            jitObject.setFallBack(true);
     2659            return;
     2660        }
     2661
    26612662        m_backtrackingState.linkDataLabels(linkBuffer);
    26622663
Note: See TracChangeset for help on using the changeset viewer.