Skip to content

Commit fb6c05e

Browse files
author
Georgii Rylov
committed
add correct frame size for aot standard frames
1 parent b9039f9 commit fb6c05e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/iwasm/aot/aot_runtime.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4166,10 +4166,11 @@ aot_iterate_callstack_standard_frame(WASMExecEnv *exec_env,
41664166
AOTFrame *cur_frame = (AOTFrame *)wasm_exec_env_get_cur_frame(exec_env);
41674167
uint8 *top_boundary = exec_env->wasm_stack.top_boundary;
41684168
uint8 *bottom = exec_env->wasm_stack.bottom;
4169+
uint32 frame_size = (uint32)offsetof(AOTFrame, lp);
41694170

41704171
WASMCApiFrame record_frame;
41714172
while (cur_frame && (uint8_t *)cur_frame >= bottom
4172-
&& (uint8_t *)cur_frame + sizeof(AOTFrame) <= top_boundary) {
4173+
&& (uint8_t *)cur_frame + frame_size <= top_boundary) {
41734174
record_frame.instance = module_inst;
41744175
record_frame.module_offset = 0;
41754176
record_frame.func_index = (uint32)cur_frame->func_index;

0 commit comments

Comments
 (0)