| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdint.h> | 5 #include <stdint.h> |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include "src/wasm/wasm-macro-gen.h" | 9 #include "src/wasm/wasm-macro-gen.h" |
| 10 | 10 |
| (...skipping 1492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1503 } | 1503 } |
| 1504 | 1504 |
| 1505 for (uint32_t offset = 0x80000000; offset < 0x80000010; offset++) { | 1505 for (uint32_t offset = 0x80000000; offset < 0x80000010; offset++) { |
| 1506 CHECK_TRAP(r.Call(offset)); | 1506 CHECK_TRAP(r.Call(offset)); |
| 1507 } | 1507 } |
| 1508 } | 1508 } |
| 1509 | 1509 |
| 1510 | 1510 |
| 1511 TEST(Run_Wasm_LoadMemI32_oob_asm) { | 1511 TEST(Run_Wasm_LoadMemI32_oob_asm) { |
| 1512 TestingModule module; | 1512 TestingModule module; |
| 1513 module.asm_js = true; | 1513 module.origin = kAsmJsOrigin; |
| 1514 int32_t* memory = module.AddMemoryElems<int32_t>(8); | 1514 int32_t* memory = module.AddMemoryElems<int32_t>(8); |
| 1515 WasmRunner<int32_t> r(&module, MachineType::Uint32()); | 1515 WasmRunner<int32_t> r(&module, MachineType::Uint32()); |
| 1516 module.RandomizeMemory(1112); | 1516 module.RandomizeMemory(1112); |
| 1517 | 1517 |
| 1518 BUILD(r, WASM_LOAD_MEM(MachineType::Int32(), WASM_GET_LOCAL(0))); | 1518 BUILD(r, WASM_LOAD_MEM(MachineType::Int32(), WASM_GET_LOCAL(0))); |
| 1519 | 1519 |
| 1520 memory[0] = 999999; | 1520 memory[0] = 999999; |
| 1521 CHECK_EQ(999999, r.Call(0u)); | 1521 CHECK_EQ(999999, r.Call(0u)); |
| 1522 // TODO(titzer): offset 29-31 should also be OOB. | 1522 // TODO(titzer): offset 29-31 should also be OOB. |
| 1523 for (uint32_t offset = 32; offset < 40; offset++) { | 1523 for (uint32_t offset = 32; offset < 40; offset++) { |
| (...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3382 | 3382 |
| 3383 #if WASM_64 | 3383 #if WASM_64 |
| 3384 TEST(Compile_Wasm_CallIndirect_Many_i64) { CompileCallIndirectMany(kAstI64); } | 3384 TEST(Compile_Wasm_CallIndirect_Many_i64) { CompileCallIndirectMany(kAstI64); } |
| 3385 #endif | 3385 #endif |
| 3386 | 3386 |
| 3387 | 3387 |
| 3388 TEST(Compile_Wasm_CallIndirect_Many_f32) { CompileCallIndirectMany(kAstF32); } | 3388 TEST(Compile_Wasm_CallIndirect_Many_f32) { CompileCallIndirectMany(kAstF32); } |
| 3389 | 3389 |
| 3390 | 3390 |
| 3391 TEST(Compile_Wasm_CallIndirect_Many_f64) { CompileCallIndirectMany(kAstF64); } | 3391 TEST(Compile_Wasm_CallIndirect_Many_f64) { CompileCallIndirectMany(kAstF64); } |
| OLD | NEW |