Title: [276298] trunk/JSTests
Revision
276298
Author
[email protected]
Date
2021-04-20 03:25:08 -0700 (Tue, 20 Apr 2021)

Log Message

[JSC] Limit memory allocation size of JSTests/stress/early-return-from-builtin.js
https://bugs.webkit.org/show_bug.cgi?id=224803
<rdar://problem/75597901>

Reviewed by Ryosuke Niwa.

Add limit to JSTests/stress/early-return-from-builtin.js to avoid infinite allocation.

* stress/early-return-from-builtin.js:
(let.iter.Symbol.iterator):

Modified Paths

Diff

Modified: trunk/JSTests/ChangeLog (276297 => 276298)


--- trunk/JSTests/ChangeLog	2021-04-20 10:24:08 UTC (rev 276297)
+++ trunk/JSTests/ChangeLog	2021-04-20 10:25:08 UTC (rev 276298)
@@ -1,3 +1,16 @@
+2021-04-20  Yusuke Suzuki  <[email protected]>
+
+        [JSC] Limit memory allocation size of JSTests/stress/early-return-from-builtin.js
+        https://bugs.webkit.org/show_bug.cgi?id=224803
+        <rdar://problem/75597901>
+
+        Reviewed by Ryosuke Niwa.
+
+        Add limit to JSTests/stress/early-return-from-builtin.js to avoid infinite allocation.
+
+        * stress/early-return-from-builtin.js:
+        (let.iter.Symbol.iterator):
+
 2021-04-19  Yusuke Suzuki  <[email protected]>
 
         [JSC] Rebaseline test results for new ICU

Modified: trunk/JSTests/stress/early-return-from-builtin.js (276297 => 276298)


--- trunk/JSTests/stress/early-return-from-builtin.js	2021-04-20 10:24:08 UTC (rev 276297)
+++ trunk/JSTests/stress/early-return-from-builtin.js	2021-04-20 10:25:08 UTC (rev 276298)
@@ -1,4 +1,3 @@
-//@ skip if ($architecture != "arm64" and $architecture != "x86-64") or $memoryLimited
 //@ runDefault("--earlyReturnFromInfiniteLoopsLimit=10", "--returnEarlyFromInfiniteLoopsForFuzzing=1", "--watchdog=1000", "--watchdog-exception-ok")
 
 let o = {
@@ -8,11 +7,17 @@
 };
 
 
+let i = 0;
 let iter = {
   [Symbol.iterator]() {
     return {
       next() {
-        return o;
+        ++i
+        if (i < 1e6)
+            return o;
+        return {
+            done: true
+        };
       }
     }
   }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to