-
-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable more sanitizers in make develop
#1588
Conversation
Hmm. Does BSD make have a way to not pass this flag for that compiler? (Or we can just start using |
Actually, can't we just leave out |
-fsanitize=leak
and -fsanitize=undefined
-fsanitize=undefined
and ASAN_OPTIONS=detect_leaks=1
Edit: never mind:
Edit 2: g+ would also not support Edit 3: Also, I was right, we do rely on them. When I locally build |
@ISSOtm We have no good solution for conditionally enabling flags based on the OS/compiler in the Makefile, because we're committed to supporting the super-limited BSD/POSIX make. However, it's trivial in cmake. Given that enabling |
abdd51d
to
dee0cc4
Compare
-fsanitize=undefined
and ASAN_OPTIONS=detect_leaks=1
make develop
- `-fsanitize=undefined` encompasses multiple checks we were specifying - "detect_leaks=1" for `__asan_default_options` checks for memory leaks (except for with macOS clang++, which does not support LSan) - `-fsanitize=float-divide-by-zero` is an extra UBSan check (and reveals a UB bug to fix with fixed-point `DIV` and `LOG`)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good! Thank you.
-fsanitize=undefined
encompasses multiple checks we were specifying"detect_leaks=1"
for__asan_default_options
checks for memory leaks (except for with macOS clang++, which does not support LSan)-fsanitize=float-divide-by-zero
is an extra UBSan check (and reveals a UB bug to fix with fixed-pointDIV
andLOG
)