Description
If allocator.create(Vm) fails in WasmModule.loadLinked, the function returns a module with an uninitialized vm field. Later, deinit() on this module triggers undefined behavior.
Steps to reproduce
- Simulate OOM during allocator.create(Vm) in loadLinked
- Observe that the returned module has an uninitialized vm field
- Call deinit() on this module
- Undefined behavior occurs (crash or memory error)
zwasm version
1.8.0
Platform
Linux x86_64
Additional context
No response
Description
If allocator.create(Vm) fails in WasmModule.loadLinked, the function returns a module with an uninitialized vm field. Later, deinit() on this module triggers undefined behavior.
Steps to reproduce
zwasm version
1.8.0
Platform
Linux x86_64
Additional context
No response