Skip to content

Commit a7f12a6

Browse files
committed
Fix: initialize record_frame in aot_copy_callstack
1 parent 01f4ff4 commit a7f12a6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
.cache
23
.clangd
34
.vs
@@ -39,4 +40,4 @@ tests/benchmarks/coremark/coremark*
3940
samples/workload/include/**
4041
!samples/workload/include/.gitkeep
4142

42-
# core/iwasm/libraries/wasi-threads
43+
# core/iwasm/libraries/wasi-threads

core/iwasm/aot/aot_runtime.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4332,6 +4332,7 @@ aot_copy_callstack_tiny_frame(WASMExecEnv *exec_env, WASMCApiFrame *buffer,
43324332

43334333
AOTTinyFrame *frame = (AOTTinyFrame *)(top - sizeof(AOTTinyFrame));
43344334
WASMCApiFrame record_frame;
4335+
memset(&record_frame, 0, sizeof(WASMCApiFrame));
43354336
while (frame && (uint8_t *)frame >= bottom && count < (skip_n + length)) {
43364337
if (count < skip_n) {
43374338
++count;
@@ -4374,6 +4375,7 @@ aot_copy_callstack_standard_frame(WASMExecEnv *exec_env, WASMCApiFrame *buffer,
43744375
uint32 frame_size = (uint32)offsetof(AOTFrame, lp);
43754376

43764377
WASMCApiFrame record_frame;
4378+
memset(&record_frame, 0, sizeof(WASMCApiFrame));
43774379
while (cur_frame && (uint8_t *)cur_frame >= bottom
43784380
&& (uint8_t *)cur_frame + frame_size <= top_boundary
43794381
&& count < (skip_n + length)) {

0 commit comments

Comments
 (0)