Skip to content
Snippets Groups Projects
Verified Commit b4799fdc authored by Jacob Lorentzon's avatar Jacob Lorentzon
Browse files

Don't map thread stacks as MAP_SHARED, lol.

MAP_SHARED means it will continue to be shared after forks, which
obviously isn't the correct behavior. `acid thread` doesn't segfault
infinitely, anymore.
parent df91c67c
No related branches found
No related tags found
No related merge requests found
...@@ -127,7 +127,7 @@ pub(crate) unsafe fn create( ...@@ -127,7 +127,7 @@ pub(crate) unsafe fn create(
core::ptr::null_mut(), core::ptr::null_mut(),
stack_size, stack_size,
sys_mman::PROT_READ | sys_mman::PROT_WRITE, sys_mman::PROT_READ | sys_mman::PROT_WRITE,
sys_mman::MAP_SHARED | sys_mman::MAP_ANONYMOUS, sys_mman::MAP_PRIVATE | sys_mman::MAP_ANONYMOUS,
-1, -1,
0, 0,
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment