Changeset 150603 in webkit
- Timestamp:
- May 23, 2013 12:19:10 PM (11 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r150600 r150603 1 2013-05-23 Patrick Gansterer <paroga@webkit.org> 2 3 Use correct stack size on Solaris and OpenBSD 4 https://bugs.webkit.org/show_bug.cgi?id=114978 5 6 Reviewed by Oliver Hunt. 7 8 Original patch by David Hill <david@wmol.com>. 9 10 Use stack_t.ss_size for getting the size of the stack. 11 12 * wtf/Platform.h: 13 * wtf/StackBounds.cpp: 14 (WTF): 15 (WTF::StackBounds::initialize): 16 1 17 2013-05-23 Patrick Gansterer <paroga@webkit.org> 2 18 -
trunk/Source/WTF/wtf/Platform.h
r150561 r150603 66 66 #endif 67 67 68 /* CPU(HPPA) - HP PA-RISC */ 69 #if defined(__hppa__) || defined(__hppa64__) 70 #define WTF_CPU_HPPA 1 71 #endif 72 68 73 /* CPU(IA64) - Itanium / IA-64 */ 69 74 #if defined(__ia64__) -
trunk/Source/WTF/wtf/StackBounds.cpp
r150600 r150603 56 56 namespace WTF { 57 57 58 // Bug 26276 - Need a mechanism to determine stack extent59 //60 // These platforms should now be working correctly:61 // DARWIN, QNX, UNIX, WINDOWS62 // These platforms are not:63 // SOLARIS, OPENBSD64 //65 // FIXME: remove this! - this code unsafely guesses at stack sizes!66 #if OS(SOLARIS) || OS(OPENBSD)67 // Based on the current limit used by the JSC parser, guess the stack size.68 static const ptrdiff_t estimatedStackSize = 128 * sizeof(void*) * 1024;69 // This method assumes the stack is growing downwards.70 static void* estimateStackBound(void* origin)71 {72 return static_cast<char*>(origin) - estimatedStackSize;73 }74 #endif75 76 58 #if OS(DARWIN) 77 59 … … 125 107 thr_stksegment(&s); 126 108 m_origin = s.ss_sp; 127 m_bound = estimateStackBound(m_origin);109 m_bound = static_cast<char*>(m_origin) - s.ss_size; 128 110 } 129 111 … … 136 118 pthread_stackseg_np(thread, &stack); 137 119 m_origin = stack.ss_sp; 138 m_bound = estimateStackBound(m_origin); 120 #if CPU(HPPA) 121 m_bound = static_cast<char*>(m_origin) + stack.ss_size; 122 #else 123 m_bound = static_cast<char*>(m_origin) - stack.ss_size; 124 #endif 139 125 } 140 126
Note: See TracChangeset
for help on using the changeset viewer.