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.
This commit is contained in:
+1
-1
@@ -127,7 +127,7 @@ pub(crate) unsafe fn create(
|
||||
core::ptr::null_mut(),
|
||||
stack_size,
|
||||
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,
|
||||
0,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user