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

Unified Diff: test/cctest/wasm/test-run-wasm-asmjs.cc

Issue 2416543002: [wasm] Fix bounds check for zero initial memory. (Closed)
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
Index: test/cctest/wasm/test-run-wasm-asmjs.cc
diff --git a/test/cctest/wasm/test-run-wasm-asmjs.cc b/test/cctest/wasm/test-run-wasm-asmjs.cc
index 007fc7a8646a46e26afd15a63bb7c828422a4ecd..92882d1bbae0c5c1270f43de2a007fbadc8e26e4 100644
--- a/test/cctest/wasm/test-run-wasm-asmjs.cc
+++ b/test/cctest/wasm/test-run-wasm-asmjs.cc
@@ -245,9 +245,9 @@ WASM_EXEC_TEST(StoreMemI32_oob_asm) {
BUILD(r, WASM_UNOP(OP_TYPE, WASM_GET_LOCAL(0))); \
CHECK_EQ(1, GetMatchingRelocInfoCount(module.instance->function_code[0], \
RelocInfo::WASM_MEMORY_REFERENCE)); \
- CHECK_NE( \
- 0, GetMatchingRelocInfoCount(module.instance->function_code[0], \
- RelocInfo::WASM_MEMORY_SIZE_REFERENCE)); \
+ CHECK_NE(0, GetMatchingRelocInfoCount( \
+ module.instance->function_code[0], \
+ RelocInfo::WASM_MEMORY_DWORD_SIZE_REFERENCE)); \
bradn 2016/10/12 18:50:45 Parameterize this on the size.
gdeepti 2016/10/13 08:43:00 Got rid of additional RelocInfo modes, code remove
}
FOREACH_INT_CHECKED_LOAD_OP(INT_LOAD_TEST)
@@ -261,9 +261,9 @@ FOREACH_INT_CHECKED_LOAD_OP(INT_LOAD_TEST)
BUILD(r, WASM_BINOP(OP_TYPE, WASM_GET_LOCAL(0), WASM_GET_LOCAL(1))); \
CHECK_EQ(1, GetMatchingRelocInfoCount(module.instance->function_code[0], \
RelocInfo::WASM_MEMORY_REFERENCE)); \
- CHECK_NE( \
- 0, GetMatchingRelocInfoCount(module.instance->function_code[0], \
- RelocInfo::WASM_MEMORY_SIZE_REFERENCE)); \
+ CHECK_NE(0, GetMatchingRelocInfoCount( \
+ module.instance->function_code[0], \
+ RelocInfo::WASM_MEMORY_DWORD_SIZE_REFERENCE)); \
}
FOREACH_INT_CHECKED_STORE_OP(INT_STORE_TEST)
@@ -276,8 +276,9 @@ TEST(RunWasm_AsmCheckedLoadFloat32RelocInfo) {
CHECK_EQ(1, GetMatchingRelocInfoCount(module.instance->function_code[0],
RelocInfo::WASM_MEMORY_REFERENCE));
- CHECK_NE(0, GetMatchingRelocInfoCount(module.instance->function_code[0],
- RelocInfo::WASM_MEMORY_SIZE_REFERENCE));
+ CHECK_NE(0, GetMatchingRelocInfoCount(
+ module.instance->function_code[0],
+ RelocInfo::WASM_MEMORY_DWORD_SIZE_REFERENCE));
}
TEST(RunWasm_AsmCheckedStoreFloat32RelocInfo) {
@@ -289,8 +290,9 @@ TEST(RunWasm_AsmCheckedStoreFloat32RelocInfo) {
CHECK_EQ(1, GetMatchingRelocInfoCount(module.instance->function_code[0],
RelocInfo::WASM_MEMORY_REFERENCE));
- CHECK_NE(0, GetMatchingRelocInfoCount(module.instance->function_code[0],
- RelocInfo::WASM_MEMORY_SIZE_REFERENCE));
+ CHECK_NE(0, GetMatchingRelocInfoCount(
+ module.instance->function_code[0],
+ RelocInfo::WASM_MEMORY_DWORD_SIZE_REFERENCE));
}
TEST(RunWasm_AsmCheckedLoadFloat64RelocInfo) {
@@ -301,8 +303,9 @@ TEST(RunWasm_AsmCheckedLoadFloat64RelocInfo) {
CHECK_EQ(1, GetMatchingRelocInfoCount(module.instance->function_code[0],
RelocInfo::WASM_MEMORY_REFERENCE));
- CHECK_NE(0, GetMatchingRelocInfoCount(module.instance->function_code[0],
- RelocInfo::WASM_MEMORY_SIZE_REFERENCE));
+ CHECK_NE(0, GetMatchingRelocInfoCount(
+ module.instance->function_code[0],
+ RelocInfo::WASM_MEMORY_DWORD_SIZE_REFERENCE));
}
TEST(RunWasm_AsmCheckedStoreFloat64RelocInfo) {
@@ -314,6 +317,7 @@ TEST(RunWasm_AsmCheckedStoreFloat64RelocInfo) {
CHECK_EQ(1, GetMatchingRelocInfoCount(module.instance->function_code[0],
RelocInfo::WASM_MEMORY_REFERENCE));
- CHECK_NE(0, GetMatchingRelocInfoCount(module.instance->function_code[0],
- RelocInfo::WASM_MEMORY_SIZE_REFERENCE));
+ CHECK_NE(0, GetMatchingRelocInfoCount(
+ module.instance->function_code[0],
+ RelocInfo::WASM_MEMORY_DWORD_SIZE_REFERENCE));
}

Powered by Google App Engine
This is Rietveld 408576698