[all-commits] [llvm/llvm-project] aeaf70: [sanitizer] Change NanoTime to use clock_gettime o...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Wed Mar 10 23:03:08 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: aeaf705d5eb5b1a6956bbd64949c872a5ecdee22
https://github.com/llvm/llvm-project/commit/aeaf705d5eb5b1a6956bbd64949c872a5ecdee22
Author: Fangrui Song <i at maskray.me>
Date: 2021-03-10 (Wed, 10 Mar 2021)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
M compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
Log Message:
-----------
[sanitizer] Change NanoTime to use clock_gettime on non-glibc
This avoids the `__NR_gettimeofday` syscall number, which does not exist on 32-bit musl (it has `__NR_gettimeofday_time32`).
This switched Android to `clock_gettime` as well, which should work according to the old code before D96925.
Tested on Alpine Linux x86-64 (musl) and FreeBSD x86-64.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D98121
More information about the All-commits
mailing list