Skip to content

Commit f159cc5

Browse files
authored
Fix: initialize record_frame in aot_copy_callstack (#4861)
1 parent 9e4aa9c commit f159cc5

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
@@ -4333,6 +4333,7 @@ aot_copy_callstack_tiny_frame(WASMExecEnv *exec_env, WASMCApiFrame *buffer,
43334333

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

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

0 commit comments

Comments
 (0)