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:
4lDO2
2024-03-25 11:25:37 +01:00
parent df91c67cf0
commit b4799fdc28
+1 -1
View File
@@ -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,
);