Currently we use very common names for macros like ACQUIRE/RELEASE,
which cause conflicts with system headers.
Prefix all macros with SANITIZER_ to avoid conflicts.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Time | Test | |
---|---|---|
80 ms | x64 debian > LLVM.Bindings/Go::go.test |
Event Timeline
Comment Actions
Awesome! Thanks!
compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp | ||
---|---|---|
174 | is possible to fix these clang-format checks? |
Comment Actions
fixed lint warnings
compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp | ||
---|---|---|
174 | Humm... not sure why arc did not fix this... |
Comment Actions
hi,
So this change seems to break Fuchsia's canary builders for LLVM. Seems maybe a few of the macros were not updated?
If this is not too hard to fix, could you revert until a patch is ready?
The error we're seeing is:
FAILED: compiler-rt/lib/scudo/CMakeFiles/clang_rt.scudo_minimal-x86_64.dir/scudo_allocator.cpp.obj /b/s/w/ir/x/w/staging/llvm_build/./bin/clang++ --target=x86_64-unknown-fuchsia --sysroot=/b/s/w/ir/x/w/cipd/sdk/arch/x64/sysroot -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/.. --target=x86_64-unknown-fuchsia -I/b/s/w/ir/x/w/cipd/sdk/pkg/sync/include -I/b/s/w/ir/x/w/cipd/sdk/pkg/fdio/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -ffunction-sections -fdata-sections -ffile-prefix-map=/b/s/w/ir/x/w/staging/llvm_build/runtimes/runtimes-x86_64-unknown-fuchsia-bins=../staging/llvm_build/runtimes/runtimes-x86_64-unknown-fuchsia-bins -ffile-prefix-map=/b/s/w/ir/x/w/llvm-llvm-project/= -no-canonical-prefixes -Wall -std=c++14 -Wno-unused-parameter -O2 -g -DNDEBUG -fno-lto -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -fbuiltin -fno-rtti -Wno-format -fno-omit-frame-pointer -nostdinc++ -UNDEBUG -MD -MT compiler-rt/lib/scudo/CMakeFiles/clang_rt.scudo_minimal-x86_64.dir/scudo_allocator.cpp.obj -MF compiler-rt/lib/scudo/CMakeFiles/clang_rt.scudo_minimal-x86_64.dir/scudo_allocator.cpp.obj.d -o compiler-rt/lib/scudo/CMakeFiles/clang_rt.scudo_minimal-x86_64.dir/scudo_allocator.cpp.obj -c /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_allocator.cpp In file included from /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_allocator.cpp:21: In file included from /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_tsd.h:61: /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_tsd_shared.inc:45:37: error: expected function body after function declarator getTSDAndLock(bool *UnlockRequired) NO_THREAD_SAFETY_ANALYSIS { ^ /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_allocator.cpp:352:23: error: use of undeclared identifier 'getTSDAndLock'; did you mean 'getTSDAndLockSlow'? ScudoTSD *TSD = getTSDAndLock(&UnlockRequired); ^~~~~~~~~~~~~ getTSDAndLockSlow /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_tsd_shared.inc:42:11: note: 'getTSDAndLockSlow' declared here ScudoTSD *getTSDAndLockSlow(ScudoTSD *TSD); ^ /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_allocator.cpp:352:37: error: cannot initialize a parameter of type '__scudo::ScudoTSD *' with an rvalue of type 'bool *' ScudoTSD *TSD = getTSDAndLock(&UnlockRequired); ^~~~~~~~~~~~~~~ /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_tsd_shared.inc:42:39: note: passing argument to parameter 'TSD' here ScudoTSD *getTSDAndLockSlow(ScudoTSD *TSD); ^ /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_allocator.cpp:418:25: error: use of undeclared identifier 'getTSDAndLock'; did you mean 'getTSDAndLockSlow'? ScudoTSD *TSD = getTSDAndLock(&UnlockRequired); ^~~~~~~~~~~~~ getTSDAndLockSlow /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_tsd_shared.inc:42:11: note: 'getTSDAndLockSlow' declared here ScudoTSD *getTSDAndLockSlow(ScudoTSD *TSD); ^ /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_allocator.cpp:418:39: error: cannot initialize a parameter of type '__scudo::ScudoTSD *' with an rvalue of type 'bool *' ScudoTSD *TSD = getTSDAndLock(&UnlockRequired); ^~~~~~~~~~~~~~~ /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_tsd_shared.inc:42:39: note: passing argument to parameter 'TSD' here ScudoTSD *getTSDAndLockSlow(ScudoTSD *TSD); ^ /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_allocator.cpp:437:23: error: use of undeclared identifier 'getTSDAndLock'; did you mean 'getTSDAndLockSlow'? ScudoTSD *TSD = getTSDAndLock(&UnlockRequired); ^~~~~~~~~~~~~ getTSDAndLockSlow /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_tsd_shared.inc:42:11: note: 'getTSDAndLockSlow' declared here ScudoTSD *getTSDAndLockSlow(ScudoTSD *TSD); ^ /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_allocator.cpp:437:37: error: cannot initialize a parameter of type '__scudo::ScudoTSD *' with an rvalue of type 'bool *' ScudoTSD *TSD = getTSDAndLock(&UnlockRequired); ^~~~~~~~~~~~~~~ /b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/scudo/scudo_tsd_shared.inc:42:39: note: passing argument to parameter 'TSD' here ScudoTSD *getTSDAndLockSlow(ScudoTSD *TSD); ^
It seems to me that NO_THREAD_SAFETY_ANALYSIS is just missing the SANITIZER_ prefix. so hopefully this will be easy to address.
clang-format: please reformat the code