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

Unified Diff: test/cctest/compiler/test-run-wasm-machops.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/compiler/test-run-wasm-machops.cc
diff --git a/test/cctest/compiler/test-run-wasm-machops.cc b/test/cctest/compiler/test-run-wasm-machops.cc
index 0b23669cf7d04280e551ff36d2b1bb03150fcc84..93a1e247330d667a13da80f2aacfbed2d0fb574a 100644
--- a/test/cctest/compiler/test-run-wasm-machops.cc
+++ b/test/cctest/compiler/test-run-wasm-machops.cc
@@ -22,8 +22,9 @@ static void UpdateMemoryReferences(Handle<Code> code, Address old_base,
uint32_t new_size) {
Isolate* isolate = CcTest::i_isolate();
bool modified = false;
- int mode_mask = RelocInfo::ModeMask(RelocInfo::WASM_MEMORY_REFERENCE) |
- RelocInfo::ModeMask(RelocInfo::WASM_MEMORY_SIZE_REFERENCE);
+ int mode_mask =
+ RelocInfo::ModeMask(RelocInfo::WASM_MEMORY_REFERENCE) |
+ RelocInfo::ModeMask(RelocInfo::WASM_MEMORY_DWORD_SIZE_REFERENCE);
bradn 2016/10/12 18:50:45 Test all the sizes.
gdeepti 2016/10/13 08:43:00 Got rid of additional RelocInfo modes, code remove
for (RelocIterator it(*code, mode_mask); !it.done(); it.next()) {
RelocInfo::Mode mode = it.rinfo()->rmode();
if (RelocInfo::IsWasmMemoryReference(mode) ||
@@ -150,8 +151,8 @@ TEST(Uint32LessThanRelocation) {
RawMachineAssemblerTester<uint32_t> m;
RawMachineLabel within_bounds, out_of_bounds;
Node* index = m.Int32Constant(0x200);
- Node* limit =
- m.RelocatableInt32Constant(0x200, RelocInfo::WASM_MEMORY_SIZE_REFERENCE);
+ Node* limit = m.RelocatableInt32Constant(
+ 0x200, RelocInfo::WASM_MEMORY_DWORD_SIZE_REFERENCE);
Node* cond = m.AddNode(m.machine()->Uint32LessThan(), index, limit);
m.Branch(cond, &within_bounds, &out_of_bounds);
m.Bind(&within_bounds);

Powered by Google App Engine
This is Rietveld 408576698