diff options
author | Dan Liew <dan@su-root.co.uk> | 2018-02-24 13:14:44 +0000 |
---|---|---|
committer | Dan Liew <dan@su-root.co.uk> | 2018-02-24 13:14:44 +0000 |
commit | 241e7ddf993d8a9140649384f9ca7b4c32ddd73e (patch) | |
tree | 0083a36bb1a09e9d33de022c1b86b806a4022a94 /utils | |
parent | a8e9075ee7e5756bfa485e5ba5339263f20b0565 (diff) |
[ubsan-minimal] Fix the ubsan_minimal debug build (COMPILER_RT_DEBUG=1) on macOS.
`ubsan_minimal` makes use of the `_sanitizer::atomic_load` function.
This function uses the `DCHECK` macro which in debug builds will use
the `_sanitizer::CheckFailed` function.
This function is part of `sanitizer_common` but `ubsan_minimal` doesn't
use this so the implementation is missing which leads to link failures
on macOS when trying to link `libclang_rt.ubsan_minimal_osx_dynamic.dylib`.
This is in contrast to the BFD linker on Linux which doesn't seem to care
about the missing symbol.
A basic implementation of `_sanitizer::CheckFailed` has been added to
the `ubsan_minimal` debug build to avoid the link error. The
implementation could definitely be improved but I don't know which
functions can be used in this context so I decided to restrict myself to
functions only being used in `ubsan_minimal` already.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@326032 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
0 files changed, 0 insertions, 0 deletions