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

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

Issue 2410953003: [wasm] Fix decoding of shared global index space (Closed)
Patch Set: Increase allocation limit 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..07addae634a15a0535e4c23866f0db8868c581b6 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(titzer): These should be runtime errors and not CHECKs if
+ // dest_addr 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