⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 285187 in webkit


Ignore:
Timestamp:
Nov 2, 2021, 3:09:25 PM (5 years ago)
Author:
commit-queue@webkit.org
Message:

Fails to execute JavaScript when soft stack limit is unlimited
​https://bugs.webkit.org/show_bug.cgi?id=232328

Patch by Michael Catanzaro <Michael Catanzaro> on 2021-11-02
Reviewed by Yusuke Suzuki.

Fall back to assuming an 8 MB stack limit when the real limit is unlimited. JSC needs to
have some maximum stack size to work with, and this is as good as any.

  • wtf/StackBounds.cpp:

(WTF::StackBounds::currentThreadStackBoundsInternal):

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r285178 r285187  
     12021-11-02  Michael Catanzaro  <mcatanzaro@gnome.org>
     2
     3        Fails to execute JavaScript when soft stack limit is unlimited
     4        https://bugs.webkit.org/show_bug.cgi?id=232328
     5
     6        Reviewed by Yusuke Suzuki.
     7
     8        Fall back to assuming an 8 MB stack limit when the real limit is unlimited. JSC needs to
     9        have some maximum stack size to work with, and this is as good as any.
     10
     11        * wtf/StackBounds.cpp:
     12        (WTF::StackBounds::currentThreadStackBoundsInternal):
     13
    1142021-11-02  Philip Chimento  <pchimento@igalia.com>
    215
  • trunk/Source/WTF/wtf/StackBounds.cpp

    r276695 r285187  
    6666        getrlimit(RLIMIT_STACK, &limit);
    6767        rlim_t size = limit.rlim_cur;
     68        if (size == RLIM_INFINITY)
     69            size = 8 * MB;
    6870        void* bound = static_cast<char*>(origin) - size;
    6971        return StackBounds { origin, bound };
    … …  
    126128        getrlimit(RLIMIT_STACK, &limit);
    127129        rlim_t size = limit.rlim_cur;
     130        if (size == RLIM_INFINITY)
     131            size = 8 * MB;
    128132        // account for a guard page
    129133        size -= static_cast<rlim_t>(sysconf(_SC_PAGESIZE));
Note: See TracChangeset for help on using the changeset viewer.