Changeset 75405 in webkit
- Timestamp:
- Jan 10, 2011 12:13:38 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r75343 r75405 1 2011-01-10 Adam Roben <aroben@apple.com> 2 3 Roll out r75289 4 5 It was causing assertion failures. See <http://webkit.org/b/52156>. 6 7 * wtf/StackBounds.cpp: 8 (WTF::StackBounds::initialize): 9 1 10 2011-01-08 Patrick Gansterer <paroga@webkit.org> 2 11 -
trunk/Source/JavaScriptCore/wtf/StackBounds.cpp
r75289 r75405 61 61 // 62 62 // These platforms should now be working correctly: 63 // DARWIN, WINDOWS-CPU(X86), QNX, UNIX, WINCE63 // DARWIN, QNX, UNIX 64 64 // These platforms are not: 65 // WINDOWS -CPU(X86_64), SOLARIS, OPENBSD, SYMBIAN, HAIKU65 // WINDOWS, SOLARIS, OPENBSD, SYMBIAN, HAIKU, WINCE 66 66 // 67 67 // FIXME: remove this! - this code unsafely guesses at stack sizes! 68 #if (OS(WINDOWS) && CPU(X86_64)) || OS(SOLARIS) || OS(OPENBSD) || OS(SYMBIAN) || OS(HAIKU)68 #if OS(WINDOWS) || OS(SOLARIS) || OS(OPENBSD) || OS(SYMBIAN) || OS(HAIKU) 69 69 // Based on the current limit used by the JSC parser, guess the stack size. 70 70 static const ptrdiff_t estimatedStackSize = 128 * sizeof(void*) * 1024; … … 248 248 } 249 249 250 #elif OS(WINDOWS) && (CPU(X86) || CPU(X86_64))251 252 void StackBounds::initialize() 253 { 254 #if CPU(X86) 255 // Offset 0x18 from the FS segment register gives a pointer to256 // the thread information block for the current thread .250 #elif OS(WINDOWS) 251 252 void StackBounds::initialize() 253 { 254 #if CPU(X86) && COMPILER(MSVC) 255 // offset 0x18 from the FS segment register gives a pointer to 256 // the thread information block for the current thread 257 257 NT_TIB* pTib; 258 #if COMPILER(MSVC)259 258 __asm { 260 259 MOV EAX, FS:[18h] 261 260 MOV pTib, EAX 262 261 } 263 #else 262 m_origin = static_cast<void*>(pTib->StackBase); 263 #elif CPU(X86) && COMPILER(GCC) 264 // offset 0x18 from the FS segment register gives a pointer to 265 // the thread information block for the current thread 266 NT_TIB* pTib; 264 267 asm ( "movl %%fs:0x18, %0\n" 265 268 : "=r" (pTib) 266 269 ); 267 #endif268 // See http://en.wikipedia.org/wiki/Win32_Thread_Information_Block for more information!269 void* pDeallocationStack = reinterpret_cast<char*>(pTib) + 0xE0C;270 270 m_origin = static_cast<void*>(pTib->StackBase); 271 m_bound = *static_cast<void**>(pDeallocationStack);272 271 #elif CPU(X86_64) 273 272 PNT_TIB64 pTib = reinterpret_cast<PNT_TIB64>(NtCurrentTeb()); 274 273 m_origin = reinterpret_cast<void*>(pTib->StackBase); 275 m_bound = estimateStackBound(m_origin);276 #endif277 }278 279 274 #else 280 #error Need a way to get the stack bounds on this platform. 275 #error Need a way to get the stack bounds on this platform (Windows) 276 #endif 277 // Looks like we should be able to get pTib->StackLimit 278 m_bound = estimateStackBound(m_origin); 279 } 280 281 #else 282 #error Need a way to get the stack bounds on this platform 281 283 #endif 282 284
Note: See TracChangeset
for help on using the changeset viewer.