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

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

Issue 2052623003: [wasm] improve handling of malformed input (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 4 years, 6 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
« no previous file with comments | « test/unittests/wasm/leb-helper-unittest.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 7d97c5065e814284f1b956ffbcab0d90b6c22304..c134de890d22ff73bc42944e45c75d1b5613155f 100644
--- a/test/unittests/wasm/loop-assignment-analysis-unittest.cc
+++ b/test/unittests/wasm/loop-assignment-analysis-unittest.cc
@@ -180,6 +180,14 @@ TEST_F(WasmLoopAssignmentAnalyzerTest, Loop2) {
}
}
+TEST_F(WasmLoopAssignmentAnalyzerTest, Malformed) {
+ byte code[] = {kExprLoop, kExprF32Neg, kExprBrTable, 0x0e, 'h', 'e',
+ 'l', 'l', 'o', ',', ' ', 'w',
+ 'o', 'r', 'l', 'd', '!'};
+ BitVector* assigned = Analyze(code, code + arraysize(code));
+ CHECK_NULL(assigned);
+}
+
} // namespace wasm
} // namespace internal
} // namespace v8
« no previous file with comments | « test/unittests/wasm/leb-helper-unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698