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
This commit is contained in:
parent
efb8f0b8db
commit
0a736f0a6a
@ -2208,9 +2208,9 @@ void CheckASLR() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ((aslr_status & PROC_ASLR_ACTIVE) != 0) {
|
if ((aslr_status & PROC_ASLR_ACTIVE) != 0) {
|
||||||
Printf("This sanitizer is not compatible with enabled ASLR "
|
VReport(1, "This sanitizer is not compatible with enabled ASLR "
|
||||||
"and binaries compiled with PIE\n"
|
"and binaries compiled with PIE\n"
|
||||||
"ASLR will be disabled and the program re-executed.\n");
|
"ASLR will be disabled and the program re-executed.\n");
|
||||||
int aslr_ctl = PROC_ASLR_FORCE_DISABLE;
|
int aslr_ctl = PROC_ASLR_FORCE_DISABLE;
|
||||||
CHECK_NE(procctl(P_PID, 0, PROC_ASLR_CTL, &aslr_ctl), -1);
|
CHECK_NE(procctl(P_PID, 0, PROC_ASLR_CTL, &aslr_ctl), -1);
|
||||||
ReExec();
|
ReExec();
|
||||||
|
Loading…
Reference in New Issue
Block a user