Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1043)

Unified Diff: test/mjsunit/asm/asm-validation.js

Issue 2481103002: [wasm] [asm.js] Don't allow bad return types from a global constant (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/asmjs/test-asm-typer.cc ('k') | test/mjsunit/asm/regress-660813.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/asm/asm-validation.js
diff --git a/test/mjsunit/asm/asm-validation.js b/test/mjsunit/asm/asm-validation.js
index 158187a7966b53606eb5c923741a386b8f010360..06799dab67a3cb53c9209c87d061acba3125f58d 100644
--- a/test/mjsunit/asm/asm-validation.js
+++ b/test/mjsunit/asm/asm-validation.js
@@ -283,3 +283,15 @@ function assertValidAsm(func) {
assertValidAsm(Module);
assertEquals(123, m.foo());
})();
+
+(function TestBadConstUnsignedReturn() {
+ function Module() {
+ "use asm";
+ const i = 0xffffffff;
+ function foo() { return i; }
+ return { foo: foo };
+ }
+ var m = Module();
+ assertTrue(%IsNotAsmWasmCode(Module));
+ assertEquals(0xffffffff, m.foo());
+})();
« no previous file with comments | « test/cctest/asmjs/test-asm-typer.cc ('k') | test/mjsunit/asm/regress-660813.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698