Changeset 161038 in webkit


Ignore:
Timestamp:
Dec 23, 2013, 4:49:45 PM (11 years ago)
Author:
mark.lam@apple.com
Message:

CStack:Fixed JSStack::disableErrorStackReserve() and JSStack::installTrapsAfterFrame().
https://bugs.webkit.org/show_bug.cgi?id=126191.

Not yet reviewed.

  1. JSStack::disableErrorStackReserve() was wrongly comparing m_end with m_useableTop. Fixed the comparison.
  2. JSStack::installTrapsAfterFrame() was wrongly overwriting the top slot of the top frame. Fixed to start the trap words at the slot below the top slot in the top frame (as in at lower memory below the allocated stack memory above it).
  • interpreter/JSStack.cpp:

(JSC::JSStack::disableErrorStackReserve):

  • interpreter/JSStackInlines.h:

(JSC::JSStack::installTrapsAfterFrame):

Location:
branches/jsCStack/Source/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/jsCStack/Source/JavaScriptCore/ChangeLog

    r161036 r161038  
     12013-12-23  Mark Lam  <mark.lam@apple.com>
     2
     3        CStack:Fixed JSStack::disableErrorStackReserve() and JSStack::installTrapsAfterFrame().
     4        https://bugs.webkit.org/show_bug.cgi?id=126191.
     5
     6        Not yet reviewed.
     7
     8        1. JSStack::disableErrorStackReserve() was wrongly comparing m_end with m_useableTop.
     9           Fixed the comparison.
     10        2. JSStack::installTrapsAfterFrame() was wrongly overwriting the top slot of the top
     11           frame. Fixed to start the trap words at the slot below the top slot in the top
     12           frame (as in at lower memory below the allocated stack memory above it).
     13
     14        * interpreter/JSStack.cpp:
     15        (JSC::JSStack::disableErrorStackReserve):
     16        * interpreter/JSStackInlines.h:
     17        (JSC::JSStack::installTrapsAfterFrame):
     18
    1192013-12-23  Mark Lam  <mark.lam@apple.com>
    220
  • branches/jsCStack/Source/JavaScriptCore/interpreter/JSStack.cpp

    r161036 r161038  
    161161    // enabled the reserve was not previously in use. Hence, it is safe to
    162162    // shrink back to that m_useableTop.
    163     if (m_end < m_useableTop) {
     163    if (m_end + 1 < m_useableTop) {
    164164        ASSERT(m_topCallFrame->topOfFrame() > m_useableTop);
    165165        shrink(m_useableTop);
  • branches/jsCStack/Source/JavaScriptCore/interpreter/JSStackInlines.h

    r161036 r161038  
    296296    // Lay the traps:
    297297    int32_t* p = startOfTrap;
    298     while (p > endOfTrap)
    299         *p-- = 0xabadcafe; // A bad word to trigger a crash if deref'ed.
     298    while (--p >= endOfTrap)
     299        *p = 0xabadcafe; // A bad word to trigger a crash if deref'ed.
    300300}
    301301#endif // ENABLE(DEBUG_JSSTACK)
Note: See TracChangeset for help on using the changeset viewer.