Skip to content

Conversation

loganek
Copy link
Collaborator

@loganek loganek commented Feb 7, 2024

The wasm_interp_call_func_bytecode is called for the first time with the empty module / exec_env to generate a global_handle_table. Before that happens though, the function checks if the module instance has bounds check enabled. Because the module instance is null, the program crashes. I added an extra check to prevent the crashes.

…ftware bound check is enabled

The wasm_interp_call_func_bytecode is called for the first time with the empty module / exec_env to generate a global_handle_table. Before that happens though, the function checks if the module instance has bounds check enabled. Because the module instance is null, the program crashes. I added an extra check to prevent the crashes.
@wenyongh wenyongh merged commit e792c35 into bytecodealliance:main Feb 14, 2024
wenyongh added a commit that referenced this pull request Feb 17, 2024
Apply patches in branch main for branch `release/1.3.x`:
- Fix loader check_wasi_abi_compatibility (#3126)
- Zero the memory mapped from os_mmap in NuttX (#3132)
- Fix possible integer overflow in loader target block check (#3133)
- Fix locel.set in polymorphic stack (#3135)
- Fix threads opcodes' boundary check in classic-interp and fast-interp (#3136)
- aot_compile_op_call: Stop setting calling convention explicitly (#3140)
- aot compiler: Place precheck wrapper before the corresponding wrapped function (#3141)
- fast-interp: Fix copy_stack_top_i64 overlap issue (#3146)
- fast-interp: Fix frame_offset overflow issue (#3149)
- Fix null pointer access in fast-interp when configurable soft bound check is enabled (#3150)
vickiegpt pushed a commit to vickiegpt/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
…heck is enabled (bytecodealliance#3150)

The wasm_interp_call_func_bytecode is called for the first time with the empty
module/exec_env to generate a global_handle_table. Before that happens though,
the function checks if the module instance has bounds check enabled. Because
the module instance is null, the program crashes. This PR added an extra check to
prevent the crashes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants