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

Unified Diff: test/unittests/wasm/module-decoder-unittest.cc

Issue 2648383007: [wasm] Decoding the names section should stop if there is a problem with locals. (Closed)
Patch Set: Created 3 years, 11 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 | « src/wasm/module-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/module-decoder-unittest.cc
diff --git a/test/unittests/wasm/module-decoder-unittest.cc b/test/unittests/wasm/module-decoder-unittest.cc
index 258ac7311abda9a0d4c6505e9fe11ad2ffaea935..3ad142bce0cc3eaae709a25d06b3a67bb5b43a44 100644
--- a/test/unittests/wasm/module-decoder-unittest.cc
+++ b/test/unittests/wasm/module-decoder-unittest.cc
@@ -1461,6 +1461,25 @@ TEST_F(WasmModuleVerifyTest, Names_two_empty) {
EXPECT_VERIFIES(data);
}
+TEST_F(WasmModuleVerifyTest, Regression684855) {
+ static const byte data[] = {
+ SECTION_NAMES(12),
+ 0xfb, // functions count
+ 0x27, // |
+ 0x00, // function name length
+ 0xff, // local names count
+ 0xff, // |
+ 0xff, // |
+ 0xff, // |
+ 0xff, // |
+ 0xff, // error: "varint too large"
+ 0xff, // |
+ 0x00, // --
+ 0x00 // --
+ };
+ EXPECT_VERIFIES(data);
+}
+
#define EXPECT_INIT_EXPR(Type, type, value, ...) \
{ \
static const byte data[] = {__VA_ARGS__, kExprEnd}; \
« no previous file with comments | « src/wasm/module-decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698