Title: [285187] trunk/Source/WTF
Revision
285187
Author
commit-qu...@webkit.org
Date
2021-11-02 15:09:25 -0700 (Tue, 02 Nov 2021)

Log Message

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

Patch by Michael Catanzaro <mcatanz...@gnome.org> 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):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (285186 => 285187)


--- trunk/Source/WTF/ChangeLog	2021-11-02 21:52:11 UTC (rev 285186)
+++ trunk/Source/WTF/ChangeLog	2021-11-02 22:09:25 UTC (rev 285187)
@@ -1,3 +1,16 @@
+2021-11-02  Michael Catanzaro  <mcatanz...@gnome.org>
+
+        Fails to execute _javascript_ when soft stack limit is unlimited
+        https://bugs.webkit.org/show_bug.cgi?id=232328
+
+        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):
+
 2021-11-02  Philip Chimento  <pchime...@igalia.com>
 
         [JSC] Implement Temporal.Instant

Modified: trunk/Source/WTF/wtf/StackBounds.cpp (285186 => 285187)


--- trunk/Source/WTF/wtf/StackBounds.cpp	2021-11-02 21:52:11 UTC (rev 285186)
+++ trunk/Source/WTF/wtf/StackBounds.cpp	2021-11-02 22:09:25 UTC (rev 285187)
@@ -65,6 +65,8 @@
         rlimit limit;
         getrlimit(RLIMIT_STACK, &limit);
         rlim_t size = limit.rlim_cur;
+        if (size == RLIM_INFINITY)
+            size = 8 * MB;
         void* bound = static_cast<char*>(origin) - size;
         return StackBounds { origin, bound };
     }
@@ -125,6 +127,8 @@
         rlimit limit;
         getrlimit(RLIMIT_STACK, &limit);
         rlim_t size = limit.rlim_cur;
+        if (size == RLIM_INFINITY)
+            size = 8 * MB;
         // account for a guard page
         size -= static_cast<rlim_t>(sysconf(_SC_PAGESIZE));
         void* bound = static_cast<char*>(origin) - size;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to