This is an archive of the discontinued LLVM Phabricator instance.

[Sanitizers] intercept clock_getcpuclockid on FreeBSD, intercept pthread_getcpuclockid
ClosedPublic

Authored by devnexen on Aug 28 2021, 9:32 PM.

Diff Detail

Event Timeline

devnexen requested review of this revision.Aug 28 2021, 9:32 PM
devnexen created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2021, 9:32 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript

can you please add something similar or extend test/sanitizer_common/TestCases/Linux/getcpuclockid.c

devnexen updated this revision to Diff 369561.Aug 30 2021, 2:54 PM
vitalybuka accepted this revision.Sep 2 2021, 1:27 PM

Thanks. it's up to you, but I would recommend to extend getcpuclockid.c in this CL and move it in a followup CL as the move has slightly higher chance of being reverted.

This revision is now accepted and ready to land.Sep 2 2021, 1:27 PM
This revision was landed with ongoing or failed builds.Sep 2 2021, 2:36 PM
This revision was automatically updated to reflect the committed changes.
kda added a subscriber: kda.Sep 2 2021, 3:43 PM

Looks like this broke buildbot: llvm-avr-linux: https://lab.llvm.org/buildbot#builders/112/builds/9015

log snippet:

1 warning(s) in tests
********************
Unresolved Tests (5):
  SanitizerCommon-asan-x86_64-Linux :: Linux/getcpuclockid.c
  SanitizerCommon-lsan-x86_64-Linux :: Linux/getcpuclockid.c
  SanitizerCommon-msan-x86_64-Linux :: Linux/getcpuclockid.c
  SanitizerCommon-tsan-x86_64-Linux :: Linux/getcpuclockid.c
  SanitizerCommon-ubsan-x86_64-Linux :: Linux/getcpuclockid.c
Testing Time: 1530.73s
  Skipped          :    57
  Unsupported      : 22049
  Passed           : 58799
  Expectedly Failed:   126
  Unresolved       :     5
FAILED: CMakeFiles/check-all 
cd /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1 && /usr/bin/python3.6 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/./bin/llvm-lit -v -j8 --param HWASAN_ENABLE_ALIASES=1 --param USE_Z3_SOLVER=0 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/builtins/TestCases /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/builtins/Unit/X86_64LinuxConfig /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/interception/Unit /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/lsan/X86_64LsanConfig /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/lsan/X86_64AsanConfig /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/ubsan/Standalone-x86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/ubsan/AddressSanitizer-x86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/ubsan/MemorySanitizer-x86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/ubsan/ThreadSanitizer-x86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/cfi/Standalone-x86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/cfi/Devirt-x86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/cfi/Standalone-thinlto-x86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/cfi/Devirt-thinlto-x86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/cfi/Standalone-newpm-x86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/cfi/Devirt-newpm-x86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/cfi/Standalone-thinlto-newpm-x86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/cfi/Devirt-thinlto-newpm-x86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/sanitizer_common/asan-x86_64-Linux /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/sanitizer_common/lsan-x86_64-Linux /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/sanitizer_common/msan-x86_64-Linux /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/sanitizer_common/tsan-x86_64-Linux /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/sanitizer_common/ubsan-x86_64-Linux /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/sanitizer_common/Unit /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/fuzzer/unit /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/fuzzer/X86_64DefaultLinuxConfig/ /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/asan/X86_64LinuxConfig /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/asan/Unit /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/asan/X86_64LinuxDynamicConfig /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/asan/Unit/dynamic /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/dfsan/X86_64Config /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/msan/X86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/hwasan/X86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/tsan/X86_64Config /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/tsan/Unit /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/safestack /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/scudo/standalone/unit /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/scudo/standalone/unit/gwp_asan /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/scudo/X86_64LinuxConfig /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/ubsan_minimal/x86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/gwp_asan/unit /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/gwp_asan/X86_64LinuxConfig /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/profile/Profile-x86_64 /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/memprof/X86_64LinuxConfig /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/memprof/X86_64LinuxDynamicConfig /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/xray/X86_64LinuxConfig /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/orc/X86_64LinuxConfig /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/projects/compiler-rt/test/crt/X86_64LinuxConfig /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/tools/clang/tools/extra/test /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/tools/clang/tools/extra/clangd/test/../unittests /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/tools/clang/tools/extra/clangd/test /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/tools/clang/test /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/utils/lit /home/buildbot/llvm-avr-linux/llvm-avr-linux/stage1/test
ninja: build stopped: subcommand failed.

right ... commit mistake there is an useless file here.