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

MemoryCopier: use live thread ID for writes #2913

Merged
merged 3 commits into from
May 9, 2023

Conversation

sporksmith
Copy link
Contributor

In particular this fixes a crash when reaping a thread and trying to
write to the child_tid address, since the current thread is no longer
live and can't be used with the process_vm_writev syscall.

This problem was mostly latent, since when the memory mapper is enabled,
we usually do the write through shared memory instead.

@github-actions github-actions bot added Component: Documentation In-repository documentation, under docs/ Component: Main Composing the core Shadow executable labels May 8, 2023
@sporksmith sporksmith added this to the Code health and maintenance milestone May 8, 2023
@sporksmith sporksmith marked this pull request as ready for review May 8, 2023 20:53
@sporksmith sporksmith changed the title MemoryCoper: use live thread ID for writes MemoryCopier: use live thread ID for writes May 8, 2023
In particular this fixes a crash when reaping a thread and trying to
write to the `child_tid` address, since the current thread is no longer
live and can't be used with the `process_vm_writev` syscall.

This problem was mostly latent, since when the memory mapper is enabled,
we usually do the write through shared memory instead.
@sporksmith sporksmith merged commit cbbaaa9 into shadow:main May 9, 2023
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation In-repository documentation, under docs/ Component: Main Composing the core Shadow executable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants