Skip to content

Commit 0a736f0

Browse files
committed
ASAN: reduce verbosity
When running binaries compiled with libasan in PIE and with ALSR on, the previous code always print the WARNING message, the new code only printed it if the run is made with the right verbosity Before this change, many unit test will always fail because of the extra message which is printed Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D35055 MFC after: 2 weeks
1 parent efb8f0b commit 0a736f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

contrib/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2208,9 +2208,9 @@ void CheckASLR() {
22082208
return;
22092209
}
22102210
if ((aslr_status & PROC_ASLR_ACTIVE) != 0) {
2211-
Printf("This sanitizer is not compatible with enabled ASLR "
2212-
"and binaries compiled with PIE\n"
2213-
"ASLR will be disabled and the program re-executed.\n");
2211+
VReport(1, "This sanitizer is not compatible with enabled ASLR "
2212+
"and binaries compiled with PIE\n"
2213+
"ASLR will be disabled and the program re-executed.\n");
22142214
int aslr_ctl = PROC_ASLR_FORCE_DISABLE;
22152215
CHECK_NE(procctl(P_PID, 0, PROC_ASLR_CTL, &aslr_ctl), -1);
22162216
ReExec();

0 commit comments

Comments
 (0)