Fix: initialize record_frame in aot_copy_callstack (#4861)

This commit is contained in:
liang.he 2026-03-09 18:45:24 -07:00 committed by GitHub
parent 9e4aa9c850
commit f159cc56ac
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
.cache
.clangd
.vs
@ -39,4 +40,4 @@ tests/benchmarks/coremark/coremark*
samples/workload/include/**
!samples/workload/include/.gitkeep
# core/iwasm/libraries/wasi-threads
# core/iwasm/libraries/wasi-threads

View File

@ -4333,6 +4333,7 @@ aot_copy_callstack_tiny_frame(WASMExecEnv *exec_env, WASMCApiFrame *buffer,
AOTTinyFrame *frame = (AOTTinyFrame *)(top - sizeof(AOTTinyFrame));
WASMCApiFrame record_frame;
memset(&record_frame, 0, sizeof(WASMCApiFrame));
while (frame && (uint8_t *)frame >= bottom && count < (skip_n + length)) {
if (count < skip_n) {
++count;
@ -4375,6 +4376,7 @@ aot_copy_callstack_standard_frame(WASMExecEnv *exec_env, WASMCApiFrame *buffer,
uint32 frame_size = (uint32)offsetof(AOTFrame, lp);
WASMCApiFrame record_frame;
memset(&record_frame, 0, sizeof(WASMCApiFrame));
while (cur_frame && (uint8_t *)cur_frame >= bottom
&& (uint8_t *)cur_frame + frame_size <= top_boundary
&& count < (skip_n + length)) {