mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Add CI build with clang sanitizers, increase stack size to 30 MB for builds with sanitizers.
This commit is contained in:
parent
f3fe2631da
commit
ba0317be04
5 changed files with 36 additions and 2 deletions
|
@ -33,10 +33,20 @@
|
|||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined(SANITIZERS_ENABLED)
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
#include "main/main.h"
|
||||
#include "os_linuxbsd.h"
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
#if defined(SANITIZERS_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);
|
||||
#endif
|
||||
|
||||
OS_LinuxBSD os;
|
||||
|
||||
setlocale(LC_CTYPE, "");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue