Changeset 193648 in webkit
- Timestamp:
- Dec 7, 2015 1:35:02 PM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r193640 r193648 1 2015-12-07 Alberto Garcia <berto@igalia.com> 2 3 Crashes on PPC64 due to mprotect() on address not aligned to the page size 4 https://bugs.webkit.org/show_bug.cgi?id=130237 5 6 Reviewed by Mark Lam. 7 8 Make sure that commitSize is at least as big as the page size. 9 10 * interpreter/JSStack.cpp: 11 (JSC::commitSize): 12 (JSC::JSStack::JSStack): 13 (JSC::JSStack::growSlowCase): 14 * interpreter/JSStack.h: 15 1 16 2015-12-06 Filip Pizlo <fpizlo@apple.com> 2 17 -
trunk/Source/JavaScriptCore/interpreter/JSStack.cpp
r189515 r193648 41 41 static size_t committedBytesCount = 0; 42 42 43 static size_t commitSize() 44 { 45 static size_t size = 0; 46 if (!size) 47 size = std::max(16 * 1024, getpagesize()); 48 return size; 49 } 50 43 51 static StaticLock stackStatisticsMutex; 44 52 #endif // !ENABLE(JIT) … … 56 64 ASSERT(capacity && isPageAligned(capacity)); 57 65 58 m_reservation = PageReservation::reserve(WTF::roundUpToMultipleOf(commitSize , capacity), OSAllocator::JSVMStackPages);66 m_reservation = PageReservation::reserve(WTF::roundUpToMultipleOf(commitSize(), capacity), OSAllocator::JSVMStackPages); 59 67 setStackLimit(highAddress()); 60 68 m_commitTop = highAddress(); … … 90 98 // return false. 91 99 ptrdiff_t delta = reinterpret_cast<char*>(m_commitTop) - reinterpret_cast<char*>(newTopOfStackWithReservedZone); 92 delta = WTF::roundUpToMultipleOf(commitSize , delta);100 delta = WTF::roundUpToMultipleOf(commitSize(), delta); 93 101 Register* newCommitTop = m_commitTop - (delta / sizeof(Register)); 94 102 if (newCommitTop < reservationTop()) -
trunk/Source/JavaScriptCore/interpreter/JSStack.h
r189515 r193648 68 68 }; 69 69 70 static const size_t commitSize = 16 * 1024;71 70 // Allow 8k of excess registers before we start trying to reap the stack 72 71 static const ptrdiff_t maxExcessCapacity = 8 * 1024;
Note: See TracChangeset
for help on using the changeset viewer.