more checks of NO_MMAP
This commit is contained in:
parent
ab69f86cb5
commit
5a32a00f46
@ -223,7 +223,7 @@ B path_list(B path) {
|
||||
return res;
|
||||
}
|
||||
|
||||
#if __has_include(<sys/mman.h>) && __has_include(<fcntl.h>) && __has_include(<errno.h>) && __has_include(<unistd.h>) && !WASM
|
||||
#if __has_include(<sys/mman.h>) && __has_include(<fcntl.h>) && __has_include(<errno.h>) && __has_include(<unistd.h>) && !WASM && !NO_MMAP
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
2
src/vm.c
2
src/vm.c
@ -1056,7 +1056,7 @@ static void allocStack(void** curr, void** start, void** end, i32 elSize, i32 co
|
||||
#endif
|
||||
*curr = *start = mem;
|
||||
*end = ((char*)*start)+sz;
|
||||
#if !WASM
|
||||
#if !WASM && !NO_MMAP
|
||||
mprotect(*end, ps, PROT_NONE); // idk first way i found to force erroring on overflow
|
||||
#endif
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user