[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:
parent
5f7af3cd0f
commit
485fdde23c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user