Skip to content

Fix: initialize record_frame in aot_copy_callstack#4861

Merged
lum1n0us merged 1 commit intobytecodealliance:mainfrom
lum1n0us:dev/uninitialized-variable-fix
Mar 10, 2026
Merged

Fix: initialize record_frame in aot_copy_callstack#4861
lum1n0us merged 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
@lum1n0us lum1n0us merged commit f159cc5 into bytecodealliance:main Mar 10, 2026
504 checks passed
@lum1n0us lum1n0us deleted the dev/uninitialized-variable-fix branch March 10, 2026 01:45
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.

2 participants