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

Unified Diff: test/mjsunit/wasm/module-memory.js

Issue 2393083003: [wasm] Small memory size crashes.
Patch Set: Created 4 years, 2 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/module-memory.js
diff --git a/test/mjsunit/wasm/module-memory.js b/test/mjsunit/wasm/module-memory.js
index 6707f0816410c0667e3711b78936226b2e0cf2be..b1f55f0b69fa4b60778c333c8b95cd869d49d5aa 100644
--- a/test/mjsunit/wasm/module-memory.js
+++ b/test/mjsunit/wasm/module-memory.js
@@ -42,6 +42,18 @@ function genModule(memory) {
return module;
}
+
+function testSmallMemory() {
+ var buffer = new ArrayBuffer(1);
gdeepti 2016/10/07 02:50:52 Following up from offline discussions, this test s
+ var module = genModule(buffer);
+ var main = module.exports.main;
+ assertEquals(1, buffer.byteLength);
+ assertEquals(0, main(0));
+}
+
+testSmallMemory();
+
+
function testPokeMemory() {
var module = genModule(null);
var buffer = module.exports.memory.buffer;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698