Skip to content

Commit 535004d

Browse files
authored
Fix handling of non-nullable global_type during global import (#4408)
1 parent 1e41519 commit 535004d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/iwasm/interpreter/wasm_loader.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3351,7 +3351,8 @@ load_import_section(const uint8 *buf, const uint8 *buf_end, WASMModule *module,
33513351
/* valtype */
33523352
CHECK_BUF(p, p_end, 1);
33533353
global_type = read_uint8(p);
3354-
if (wasm_is_reftype_htref_nullable(global_type)) {
3354+
if (wasm_is_reftype_htref_nullable(global_type)
3355+
|| wasm_is_reftype_htref_non_nullable(global_type)) {
33553356
int32 heap_type;
33563357
read_leb_int32(p, p_end, heap_type);
33573358
(void)heap_type;

0 commit comments

Comments
 (0)