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

Unified Diff: src/wasm/module-decoder.cc

Issue 2342593002: [wasm] void is not a valid type for a global. (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
« no previous file with comments | « no previous file | test/unittests/wasm/module-decoder-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/module-decoder.cc
diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc
index cf855af21b2b6c7820d80e106be5bda2dfc2372e..c47aa351a3409209e7425989dda2314db8cbe815 100644
--- a/src/wasm/module-decoder.cc
+++ b/src/wasm/module-decoder.cc
@@ -467,6 +467,9 @@ class ModuleDecoder : public Decoder {
error("global name is not valid utf8");
}
global->type = consume_local_type();
+ if (global->type == kAstStmt) {
+ error("invalid global type");
+ }
global->offset = 0;
global->exported = consume_u8("exported") != 0;
}
« no previous file with comments | « no previous file | test/unittests/wasm/module-decoder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698