Commit 485fdde2 authored by rossberg's avatar rossberg Committed by Commit bot

[wasm] LinkError on imported i64 global

R=titzer@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2640823002
Cr-Commit-Position: refs/heads/master@{#42460}
parent 5f7af3cd
......@@ -1762,6 +1762,11 @@ class WasmInstanceBuilder {
case kExternalGlobal: {
// Global imports are converted to numbers and written into the
// {globals_} array buffer.
if (module_->globals[import.index].type == kWasmI64) {
ReportLinkError("global import cannot have type i64", index,
module_name, import_name);
return -1;
}
if (!value->IsNumber()) {
ReportLinkError("global import must be a number", index,
module_name, import_name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment