Skip to content

Fix: initialize record_frame in aot_copy_callstack#4861

Open
lum1n0us wants to merge 1 commit intobytecodealliance:mainfrom
lum1n0us:dev/uninitialized-variable-fix
Open

Fix: initialize record_frame in aot_copy_callstack#4861
lum1n0us wants to merge 1 commit intobytecodealliance:mainfrom
lum1n0us:dev/uninitialized-variable-fix

Conversation

@lum1n0us
Copy link
Contributor

@lum1n0us lum1n0us commented Mar 3, 2026

This PR fixes an issue where the record_frame variable in aot_copy_callstack_tiny_frame and aot_copy_callstack_standard_frame was being used before it was initialized.

The fix initializes the struct with memset(&record_frame, 0, sizeof(WASMCApiFrame)); to prevent potential uninitialized memory usage.

@lum1n0us lum1n0us force-pushed the dev/uninitialized-variable-fix branch from 9f605d9 to a7f12a6 Compare March 4, 2026 01:25
@lum1n0us lum1n0us added the bug-fix Determine if this PR addresses a bug. It will be used by scripts to classify PRs. label Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug-fix Determine if this PR addresses a bug. It will be used by scripts to classify PRs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant