Fix stack memory, undefined behavior, etc.

This commit is contained in:
Justine Tunney 2023-08-15 19:09:35 -07:00
parent 110559ce6a
commit 507d7a0b0b
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
11 changed files with 41 additions and 186 deletions

View file

@ -45,7 +45,7 @@ void *NewCosmoStack(void) {
MAP_STACK | MAP_ANONYMOUS, -1, 0)) != MAP_FAILED) {
if (IsAsan()) {
__asan_poison(p + GetStackSize() - 16, 16, kAsanStackOverflow);
__asan_poison(p, 4096, kAsanStackOverflow);
__asan_poison(p, GetGuardSize(), kAsanStackOverflow);
}
return p;
} else {