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

Unified Diff: src/wasm/wasm-module.cc

Issue 2410953003: [wasm] Fix decoding of shared global index space (Closed)
Patch Set: with test 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 | « src/wasm/module-decoder.cc ('k') | test/mjsunit/wasm/globals.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-module.cc
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc
index 3a4ac2dbef552e48cb2562ed785b3c3120a403b5..fa0b378b2314387a840e226d9c365794fe00996d 100644
--- a/src/wasm/wasm-module.cc
+++ b/src/wasm/wasm-module.cc
@@ -1546,6 +1546,9 @@ class WasmInstanceBuilder {
uint32_t source_size =
static_cast<uint32_t>(segment->get_int(kSourceSize));
+ // TODO: These should be runtime errors and not CHECKs if dest_addr
titzer 2016/10/12 04:56:29 You can make these TODO(titzer)
Derek Schuff 2016/10/12 05:09:25 Done.
+ // is global (and therefore initialized at linktime to an possibly-
+ // invalid value.
CHECK_LT(dest_addr, mem_size);
CHECK_LE(source_size, mem_size);
CHECK_LE(dest_addr, mem_size - source_size);
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | test/mjsunit/wasm/globals.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698