Core: Restructure sanitizers

This commit is contained in:
Thaddeus Crews 2025-06-29 08:16:34 -05:00
parent 77579f93e6
commit beda8dd027
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
11 changed files with 46 additions and 42 deletions

View file

@ -38,7 +38,7 @@
#include <clocale>
#include <cstdlib>
#if defined(SANITIZERS_ENABLED)
#if defined(ASAN_ENABLED)
#include <sys/resource.h>
#endif
@ -88,7 +88,7 @@ int main(int argc, char *argv[]) {
}
#endif
#if defined(SANITIZERS_ENABLED)
#if defined(ASAN_ENABLED)
// Note: Set stack size to be at least 30 MB (vs 8 MB default) to avoid overflow, address sanitizer can increase stack usage up to 3 times.
struct rlimit stack_lim = { 0x1E00000, 0x1E00000 };
setrlimit(RLIMIT_STACK, &stack_lim);