Title: [238934] trunk/JSTests
Revision
238934
Author
[email protected]
Date
2018-12-06 10:59:44 -0800 (Thu, 06 Dec 2018)

Log Message

stress/big-wasm-memory tests failing on 32-bit JSC bot
https://bugs.webkit.org/show_bug.cgi?id=192020

Reviewed by Saam Barati.

Not every platform has WebAssembly, e.g. 32-bit, so we should exit
the wasm stress tests if the WebAssembly object does not exist.

* stress/big-wasm-memory-grow-no-max.js:
(test.foo):
(test):
(foo): Deleted.
(catch): Deleted.
* stress/big-wasm-memory-grow.js:
(test.foo):
(test):
(foo): Deleted.
(catch): Deleted.
* stress/big-wasm-memory.js:
(test.foo):
(test):
(foo): Deleted.
(catch): Deleted.

Modified Paths

Diff

Modified: trunk/JSTests/ChangeLog (238933 => 238934)


--- trunk/JSTests/ChangeLog	2018-12-06 16:55:45 UTC (rev 238933)
+++ trunk/JSTests/ChangeLog	2018-12-06 18:59:44 UTC (rev 238934)
@@ -1,3 +1,29 @@
+2018-12-06  Keith Miller  <[email protected]>
+
+        stress/big-wasm-memory tests failing on 32-bit JSC bot
+        https://bugs.webkit.org/show_bug.cgi?id=192020
+
+        Reviewed by Saam Barati.
+
+        Not every platform has WebAssembly, e.g. 32-bit, so we should exit
+        the wasm stress tests if the WebAssembly object does not exist.
+
+        * stress/big-wasm-memory-grow-no-max.js:
+        (test.foo):
+        (test):
+        (foo): Deleted.
+        (catch): Deleted.
+        * stress/big-wasm-memory-grow.js:
+        (test.foo):
+        (test):
+        (foo): Deleted.
+        (catch): Deleted.
+        * stress/big-wasm-memory.js:
+        (test.foo):
+        (test):
+        (foo): Deleted.
+        (catch): Deleted.
+
 2018-12-05  Mark Lam  <[email protected]>
 
         speculationFromCell() should speculate non-Identifier strings as SpecString instead of SpecStringVar.

Modified: trunk/JSTests/stress/big-wasm-memory-grow-no-max.js (238933 => 238934)


--- trunk/JSTests/stress/big-wasm-memory-grow-no-max.js	2018-12-06 16:55:45 UTC (rev 238933)
+++ trunk/JSTests/stress/big-wasm-memory-grow-no-max.js	2018-12-06 18:59:44 UTC (rev 238934)
@@ -1,34 +1,45 @@
 //@ skip if $memoryLimited
-let bigArray = new Array(0x7000000);
-bigArray[0] = 1.1;
-bigArray[1] = 1.2;
 
-function foo(array) {
-    var index = array.length;
-    if (index >= bigArray.length || (index - 0x1ffdc01) < 0)
+function test() {
+
+    // We don't support WebAssembly everywhere, so check for its existance before doing anything else.
+    if (!this.WebAssembly)
         return;
-    return bigArray[index - 0x1ffdc01];
-}
 
-noInline(foo);
+    let bigArray = new Array(0x7000000);
+    bigArray[0] = 1.1;
+    bigArray[1] = 1.2;
 
-var okArray = new Uint8Array(0x1ffdc02);
+    function foo(array) {
+        var index = array.length;
+        if (index >= bigArray.length || (index - 0x1ffdc01) < 0)
+            return;
+        return bigArray[index - 0x1ffdc01];
+    }
 
-for (var i = 0; i < 10000; ++i)
-    foo(okArray);
+    noInline(foo);
 
-var ok = false;
-try {
-    var memory = new WebAssembly.Memory({ initial: 0x1000 });
-    memory.grow(0x7000);
-    var result = foo(new Uint8Array(memory.buffer));
-    if (result !== void 0)
-        throw "Error: bad result at end: " + result;
-    ok = true;
-} catch (e) {
-    if (e.toString() != "Error: Out of memory")
-        throw e;
+    var okArray = new Uint8Array(0x1ffdc02);
+
+    for (var i = 0; i < 10000; ++i)
+        foo(okArray);
+
+    var ok = false;
+    try {
+        var memory = new WebAssembly.Memory({ initial: 0x1000 });
+        memory.grow(0x7000);
+        var result = foo(new Uint8Array(memory.buffer));
+        if (result !== void 0)
+            throw "Error: bad result at end: " + result;
+        ok = true;
+    } catch (e) {
+        if (e.toString() != "Error: Out of memory")
+            throw e;
+    }
+
+    if (ok)
+        throw "Error: did not throw error";
+
 }
 
-if (ok)
-    throw "Error: did not throw error";
+test();

Modified: trunk/JSTests/stress/big-wasm-memory-grow.js (238933 => 238934)


--- trunk/JSTests/stress/big-wasm-memory-grow.js	2018-12-06 16:55:45 UTC (rev 238933)
+++ trunk/JSTests/stress/big-wasm-memory-grow.js	2018-12-06 18:59:44 UTC (rev 238934)
@@ -1,34 +1,45 @@
 //@ skip if $memoryLimited
-let bigArray = new Array(0x7000000);
-bigArray[0] = 1.1;
-bigArray[1] = 1.2;
 
-function foo(array) {
-    var index = array.length;
-    if (index >= bigArray.length || (index - 0x1ffdc01) < 0)
+function test() {
+
+    // We don't support WebAssembly everywhere, so check for its existance before doing anything else.
+    if (!this.WebAssembly)
         return;
-    return bigArray[index - 0x1ffdc01];
-}
 
-noInline(foo);
+    let bigArray = new Array(0x7000000);
+    bigArray[0] = 1.1;
+    bigArray[1] = 1.2;
 
-var okArray = new Uint8Array(0x1ffdc02);
+    function foo(array) {
+        var index = array.length;
+        if (index >= bigArray.length || (index - 0x1ffdc01) < 0)
+            return;
+        return bigArray[index - 0x1ffdc01];
+    }
 
-for (var i = 0; i < 10000; ++i)
-    foo(okArray);
+    noInline(foo);
 
-var ok = false;
-try {
-    var memory = new WebAssembly.Memory({ initial: 0x1000, maximum: 0x8000 });
-    memory.grow(0x7000);
-    var result = foo(new Uint8Array(memory.buffer));
-    if (result !== void 0)
-        throw "Error: bad result at end: " + result;
-    ok = true;
-} catch (e) {
-    if (e.toString() != "Error: Out of memory")
-        throw e;
+    var okArray = new Uint8Array(0x1ffdc02);
+
+    for (var i = 0; i < 10000; ++i)
+        foo(okArray);
+
+    var ok = false;
+    try {
+        var memory = new WebAssembly.Memory({ initial: 0x1000, maximum: 0x8000 });
+        memory.grow(0x7000);
+        var result = foo(new Uint8Array(memory.buffer));
+        if (result !== void 0)
+            throw "Error: bad result at end: " + result;
+        ok = true;
+    } catch (e) {
+        if (e.toString() != "Error: Out of memory")
+            throw e;
+    }
+
+    if (ok)
+        throw "Error: did not throw error";
+
 }
 
-if (ok)
-    throw "Error: did not throw error";
+test();

Modified: trunk/JSTests/stress/big-wasm-memory.js (238933 => 238934)


--- trunk/JSTests/stress/big-wasm-memory.js	2018-12-06 16:55:45 UTC (rev 238933)
+++ trunk/JSTests/stress/big-wasm-memory.js	2018-12-06 18:59:44 UTC (rev 238934)
@@ -1,32 +1,43 @@
 //@ skip if $memoryLimited
-let bigArray = new Array(0x7000000);
-bigArray[0] = 1.1;
-bigArray[1] = 1.2;
 
-function foo(array) {
-    var index = array.length;
-    if (index >= bigArray.length || (index - 0x1ffdc01) < 0)
+function test() {
+
+    // We don't support WebAssembly everywhere, so check for its existance before doing anything else.
+    if (!this.WebAssembly)
         return;
-    return bigArray[index - 0x1ffdc01];
-}
 
-noInline(foo);
+    let bigArray = new Array(0x7000000);
+    bigArray[0] = 1.1;
+    bigArray[1] = 1.2;
 
-var okArray = new Uint8Array(0x1ffdc02);
+    function foo(array) {
+        var index = array.length;
+        if (index >= bigArray.length || (index - 0x1ffdc01) < 0)
+            return;
+        return bigArray[index - 0x1ffdc01];
+    }
 
-for (var i = 0; i < 10000; ++i)
-    foo(okArray);
+    noInline(foo);
 
-var ok = false;
-try {
-    var result = foo(new Uint8Array(new WebAssembly.Memory({ initial: 0x8000, maximum: 0x8000 }).buffer));
-    if (result !== void 0)
-        throw "Error: bad result at end: " + result;
-    ok = true;
-} catch (e) {
-    if (e.toString() != "Error: Out of memory")
-        throw e;
+    var okArray = new Uint8Array(0x1ffdc02);
+
+    for (var i = 0; i < 10000; ++i)
+        foo(okArray);
+
+    var ok = false;
+    try {
+        var result = foo(new Uint8Array(new WebAssembly.Memory({ initial: 0x8000, maximum: 0x8000 }).buffer));
+        if (result !== void 0)
+            throw "Error: bad result at end: " + result;
+        ok = true;
+    } catch (e) {
+        if (e.toString() != "Error: Out of memory")
+            throw e;
+    }
+
+    if (ok)
+        throw "Error: did not throw error";
+
 }
 
-if (ok)
-    throw "Error: did not throw error";
+test();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to