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); |