Skip to content

MemoryCopier: use live thread ID for writes#2913

Merged
sporksmith merged 3 commits intoshadow:mainfrom
sporksmith:mm-bug
May 9, 2023
Merged

MemoryCopier: use live thread ID for writes#2913
sporksmith merged 3 commits intoshadow:mainfrom
sporksmith:mm-bug

Conversation

@sporksmith
Copy link
Copy Markdown
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 requested a review from stevenengler May 8, 2023 21:00
@sporksmith sporksmith changed the title MemoryCoper: use live thread ID for writes MemoryCopier: use live thread ID for writes May 8, 2023
sporksmith added 3 commits May 9, 2023 12:15
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
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.

2 participants