Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move rewind buffer to after TLS area if it's at the bottom of the stack #4639

Merged
merged 2 commits into from May 7, 2024

Conversation

Arshia001
Copy link
Member

This PR fixes the issue of unwind/rewind overwriting TLS if it's on the bottom of the stack.

Note, there is a breaking change to the journal archive format.

@Arshia001 Arshia001 added this to the v4.3 milestone May 6, 2024
@Arshia001 Arshia001 self-assigned this May 6, 2024
@Arshia001 Arshia001 marked this pull request as draft May 6, 2024 16:58
@Arshia001
Copy link
Member Author

This PR is a draft because I'm not done testing the changes out yet, will mark ready once I'm confident nothing is broken.

@Arshia001 Arshia001 force-pushed the fix/stack-checkpoint-overwrites-thread-locals branch from b078771 to 83020eb Compare May 6, 2024 20:23
@Arshia001 Arshia001 marked this pull request as ready for review May 7, 2024 12:55
lib/journal/src/concrete/archived.rs Show resolved Hide resolved
lib/wasi-types/src/wasix/mod.rs Show resolved Hide resolved
lib/wasix/src/syscalls/mod.rs Show resolved Hide resolved
@theduke theduke merged commit 7fb9b44 into main May 7, 2024
61 checks passed
@theduke theduke deleted the fix/stack-checkpoint-overwrites-thread-locals branch May 7, 2024 16:26
@@ -870,6 +870,21 @@ pub(crate) fn get_stack_upper(env: &WasiEnv) -> u64 {
env.layout.stack_upper
}

fn get_unwind_buffer_start(env: &WasiEnv) -> u64 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have just put this in the WasuMemoryLayout struct Impl section instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants