OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 "test/unittests/test-utils.h" | 5 #include "test/unittests/test-utils.h" |
6 | 6 |
7 #include "src/v8.h" | 7 #include "src/v8.h" |
8 | 8 |
9 #include "test/cctest/wasm/test-signatures.h" | 9 #include "test/cctest/wasm/test-signatures.h" |
10 | 10 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 180 } |
181 | 181 |
182 TEST_F(WasmLoopAssignmentAnalyzerTest, Malformed) { | 182 TEST_F(WasmLoopAssignmentAnalyzerTest, Malformed) { |
183 byte code[] = {kExprLoop, kExprF32Neg, kExprBrTable, 0x0e, 'h', 'e', | 183 byte code[] = {kExprLoop, kExprF32Neg, kExprBrTable, 0x0e, 'h', 'e', |
184 'l', 'l', 'o', ',', ' ', 'w', | 184 'l', 'l', 'o', ',', ' ', 'w', |
185 'o', 'r', 'l', 'd', '!'}; | 185 'o', 'r', 'l', 'd', '!'}; |
186 BitVector* assigned = Analyze(code, code + arraysize(code)); | 186 BitVector* assigned = Analyze(code, code + arraysize(code)); |
187 CHECK_NULL(assigned); | 187 CHECK_NULL(assigned); |
188 } | 188 } |
189 | 189 |
| 190 TEST_F(WasmLoopAssignmentAnalyzerTest, regress_642867) { |
| 191 static const byte code[] = { |
| 192 WASM_LOOP(WASM_ZERO, kExprSetLocal, 0xfa, 0xff, 0xff, 0xff, |
| 193 0x0f)}; // local index LEB128 0xfffffffa |
| 194 // Just make sure that the analysis does not crash. |
| 195 Analyze(code, code + arraysize(code)); |
| 196 } |
| 197 |
190 } // namespace wasm | 198 } // namespace wasm |
191 } // namespace internal | 199 } // namespace internal |
192 } // namespace v8 | 200 } // namespace v8 |
OLD | NEW |