forked from OSchip/llvm-project
tsan: disable ASLR in Go test on NetBSD
Tsan does not support ASLR on NetBSD. Disable ASLR in the Go test and extend the error message to be more actionable. Reported-by: Keith Randall (khr)
This commit is contained in:
parent
a517191a47
commit
efeb35e195
|
@ -2130,7 +2130,9 @@ void CheckASLR() {
|
|||
}
|
||||
|
||||
if (UNLIKELY(paxflags & CTL_PROC_PAXFLAGS_ASLR)) {
|
||||
Printf("This sanitizer is not compatible with enabled ASLR\n");
|
||||
Printf("This sanitizer is not compatible with enabled ASLR.\n"
|
||||
"To disable ASLR, please run \"paxctl +a %s\" and try again.\n",
|
||||
GetArgv()[0]);
|
||||
Die();
|
||||
}
|
||||
#elif SANITIZER_PPC64V2
|
||||
|
|
|
@ -188,6 +188,10 @@ if [ "$DEPENDS_ON_LIBC" != "1" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ "`uname -a | grep NetBSD`" != "" ]; then
|
||||
# Turn off ASLR in the test binary.
|
||||
/usr/sbin/paxctl +a $DIR/test
|
||||
fi
|
||||
export GORACE="exitcode=0 atexit_sleep_ms=0"
|
||||
if [ "$SILENT" != "1" ]; then
|
||||
$DIR/test
|
||||
|
|
Loading…
Reference in New Issue