Remove address sanitizer for windows build, stb_sprintf acts weird with address sanitizer sometimes

This commit is contained in:
Krzosa Karol
2024-01-10 20:51:03 +01:00
parent 3fca72bc57
commit a3c0a63ee2
3 changed files with 5 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ call ../misc/compile_setup.bat
mkdir build mkdir build
cd build cd build
cl -Fe:bld.exe ../code/build_main.cpp -WX -W3 -wd4200 -diagnostics:column -nologo -Zi -D_CRT_SECURE_NO_WARNINGS /fsanitize=address cl -Fe:bld.exe ../code/build_main.cpp -WX -W3 -wd4200 -diagnostics:column -nologo -Zi -D_CRT_SECURE_NO_WARNINGS
cd .. cd ..
build\bld.exe build\bld.exe

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash #!/usr/bin/env bash
gcc -o bld code/build_main.cpp -g gcc -o bld code/build_main.cpp -g
./bld cc=clang ./bld

View File

@@ -84,6 +84,9 @@ IO_API bool IO__FatalErrorf(const char *file, int line, const char *msg, ...) {
} }
IO_API void IO_Printf(const char *msg, ...) { IO_API void IO_Printf(const char *msg, ...) {
// First try to use a static buffer. That can fail because the message
// can be bigger then the buffer. Allocate enough memory to fit in that
// case.
va_list args1; va_list args1;
va_list args2; va_list args2;
char buff[2048]; char buff[2048];