Ignore:
Timestamp:
Feb 4, 2014, 9:32:21 PM (11 years ago)
Author:
[email protected]
Message:

The stack limit computation does not work for Windows.
<https://webkit.org/b/128226>

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

  • llint/LowLevelInterpreter.cpp:

(JSC::CLoopRegister::CLoopRegister):
(JSC::CLoop::execute):

  • Suppressed some compiler warnings for the C loop build.
  • runtime/VM.cpp:

(JSC::VM::updateStackLimitWithReservedZoneSize):

  • Use the new StackBounds::recursionLimit() to compute the stack limit the right way.

Source/WTF:

The current stack limit computation assumes that the stack is allocated
in high memory. On Windows, the stack seems to be allocated very near
address 0, and is smaller in size than our Options::maxPerThreadStackUsage().
This combination triggers a bug where StackBounds::recursionLimit()
underflows and computes a limit address that is ridiculously high in memory.
The net effect is that the Windows port thinks its out of stack space all
the time.

We now check for potential underflows in StackBounds and return an
appropriate limit address.

  • wtf/StackBounds.h:

(WTF::StackBounds::recursionLimit):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.cpp

    r163345 r163428  
    154154
    155155struct CLoopRegister {
     156    CLoopRegister() { i = static_cast<intptr_t>(0xbadbeef0baddbeef); }
    156157    union {
    157158        intptr_t i;
     
    480481    #undef SIGN_BIT32
    481482
     483    return JSValue(); // to suppress a compiler warning.
    482484} // Interpreter::llintCLoopExecute()
    483485
Note: See TracChangeset for help on using the changeset viewer.