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

Unified Diff: test/unittests/wasm/loop-assignment-analysis-unittest.cc

Issue 2290233008: [wasm] Validate the index of set local in AnalyzeLoopAssignment (Closed)
Patch Set: Created 4 years, 3 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
« src/wasm/ast-decoder.cc ('K') | « src/wasm/ast-decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/wasm/loop-assignment-analysis-unittest.cc
diff --git a/test/unittests/wasm/loop-assignment-analysis-unittest.cc b/test/unittests/wasm/loop-assignment-analysis-unittest.cc
index 919ce8e2345617e5930806814e2966b93b2149da..6353c21cea33f67a5f9352bba4c67e95bb88308c 100644
--- a/test/unittests/wasm/loop-assignment-analysis-unittest.cc
+++ b/test/unittests/wasm/loop-assignment-analysis-unittest.cc
@@ -49,6 +49,14 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, Empty1) {
}
}
+TEST_F(WasmLoopAssignmentAnalyzerTest, regress_642867) {
+ static const byte code[] = {
+ WASM_LOOP(WASM_ZERO, kExprSetLocal, 0xfa, 0xff, 0xff, 0xff,
+ 0x0f)}; // local index LEB128 0xfffffffa
+ BitVector* assigned = Analyze(code, code + arraysize(code));
+ CHECK_NULL(assigned);
+}
+
TEST_F(WasmLoopAssignmentAnalyzerTest, One) {
num_locals = 5;
for (int i = 0; i < 5; i++) {
« src/wasm/ast-decoder.cc ('K') | « src/wasm/ast-decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698