Changeset 232998 in webkit


Ignore:
Timestamp:
Jun 19, 2018 5:45:06 PM (6 years ago)
Author:
msaboff@apple.com
Message:

Crash in sanitizeStackForVMImpl sometimes when switching threads with same VM
https://bugs.webkit.org/show_bug.cgi?id=186827

Reviewed by Saam Barati.

Need to set VM::lastStackTop before any possible calls to sanitizeStack().

  • runtime/JSLock.cpp:

(JSC::JSLock::didAcquireLock):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r232983 r232998  
     12018-06-19  Michael Saboff  <msaboff@apple.com>
     2
     3        Crash in sanitizeStackForVMImpl sometimes when switching threads with same VM
     4        https://bugs.webkit.org/show_bug.cgi?id=186827
     5
     6        Reviewed by Saam Barati.
     7
     8        Need to set VM::lastStackTop before any possible calls to sanitizeStack().
     9
     10        * runtime/JSLock.cpp:
     11        (JSC::JSLock::didAcquireLock):
     12
    1132018-06-19  Tadeu Zagallo  <tzagallo@apple.com>
    214
  • trunk/Source/JavaScriptCore/runtime/JSLock.cpp

    r232482 r232998  
    135135    ASSERT(m_entryAtomicStringTable);
    136136
     137    m_vm->setLastStackTop(thread.savedLastStackTop());
     138    ASSERT(thread.stack().contains(m_vm->lastStackTop()));
     139
    137140    if (m_vm->heap.hasAccess())
    138141        m_shouldReleaseHeapAccess = false;
     
    146149    m_vm->setStackPointerAtVMEntry(p);
    147150
    148     m_vm->setLastStackTop(thread.savedLastStackTop());
    149     ASSERT(thread.stack().contains(m_vm->lastStackTop()));
    150    
    151151    m_vm->heap.machineThreads().addCurrentThread();
    152152#if ENABLE(WEBASSEMBLY)
Note: See TracChangeset for help on using the changeset viewer.