[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}
This commit is contained in:
rossberg 2017-01-18 06:33:07 -08:00 committed by Commit bot
parent 5f7af3cd0f
commit 485fdde23c

View File

@ -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);