mirror of
https://github.com/bytecodealliance/wasm-micro-runtime.git
synced 2025-07-16 09:18:29 +00:00
Fix drop opcode not clear frame ref issue (#2360)
This commit is contained in:
parent
61b692eacc
commit
f906585b56
|
@ -1763,12 +1763,24 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
|
|||
HANDLE_OP(WASM_OP_DROP)
|
||||
{
|
||||
frame_sp--;
|
||||
|
||||
#if WASM_ENABLE_GC != 0
|
||||
frame_ref_tmp = FRAME_REF(frame_sp);
|
||||
*frame_ref_tmp = 0;
|
||||
#endif
|
||||
HANDLE_OP_END();
|
||||
}
|
||||
|
||||
HANDLE_OP(WASM_OP_DROP_64)
|
||||
{
|
||||
frame_sp -= 2;
|
||||
|
||||
#if WASM_ENABLE_GC != 0
|
||||
frame_ref_tmp = FRAME_REF(frame_sp);
|
||||
*frame_ref_tmp = 0;
|
||||
*(frame_ref_tmp + 1) = 0;
|
||||
#endif
|
||||
|
||||
HANDLE_OP_END();
|
||||
}
|
||||
|
||||
|
|
|
@ -480,7 +480,6 @@ alloc_hmu_ex(gc_heap_t *heap, gc_size_t size)
|
|||
#if GC_IN_EVERY_ALLOCATION != 0
|
||||
if (GC_SUCCESS != do_gc_heap(heap))
|
||||
return NULL;
|
||||
return alloc_hmu(heap, size);
|
||||
#else
|
||||
if (heap->total_free_size < heap->gc_threshold) {
|
||||
if (GC_SUCCESS != do_gc_heap(heap))
|
||||
|
|
Loading…
Reference in New Issue
Block a user