| Index: src/wasm/module-decoder.cc
|
| diff --git a/src/wasm/module-decoder.cc b/src/wasm/module-decoder.cc
|
| index 38402aef767e211ec4d7e2a8e46bfc8e969ad6be..0b1aaa6c953f112dd528b3be71b613f1d14f8c9d 100644
|
| --- a/src/wasm/module-decoder.cc
|
| +++ b/src/wasm/module-decoder.cc
|
| @@ -337,6 +337,9 @@ class ModuleDecoder : public Decoder {
|
| WasmGlobal* global = &module->globals.back();
|
| global->type = consume_value_type();
|
| global->mutability = consume_u8("mutability") != 0;
|
| + if (global->mutability) {
|
| + error("mutable globals cannot be imported");
|
| + }
|
| break;
|
| }
|
| default:
|
|
|