[compiler-rt] [compiler-rt][rtsan] fopencookie support. (PR #120864)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 2 16:48:24 PST 2025


gulfemsavrun wrote:

This is just heads up that we started seeing this failure on our side after this patch:
```
[2554/2754](33) Building CXX object compiler-rt/lib/rtsan/CMakeFiles/RTRtsan.osx.dir/rtsan_interceptors_posix.cpp.o
FAILED: compiler-rt/lib/rtsan/CMakeFiles/RTRtsan.osx.dir/rtsan_interceptors_posix.cpp.o 
/Volumes/Work/s/w/ir/x/w/llvm_build/./bin/clang++ --target=x86_64-apple-darwin22.6.0 --sysroot=/Volumes/Work/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -D_DEBUG -D_GLIBCXX_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/rtsan/.. -fPIC -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 -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffile-prefix-map=/Volumes/Work/s/w/ir/x/w/llvm_build/runtimes/runtimes-bins=../../../llvm-llvm-project -ffile-prefix-map=/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/= -no-canonical-prefixes -Wall -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 -arch arm64 -arch x86_64 -isysroot /Volumes/Work/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -stdlib=libc++ -mmacosx-version-min=10.13 -isysroot /Volumes/Work/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk -fPIC -fno-builtin -fno-exceptions -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -g -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -ftrivial-auto-var-init=pattern -DSANITIZER_COMMON_NO_REDEFINE_BUILTINS -fno-rtti -MD -MT compiler-rt/lib/rtsan/CMakeFiles/RTRtsan.osx.dir/rtsan_interceptors_posix.cpp.o -MF compiler-rt/lib/rtsan/CMakeFiles/RTRtsan.osx.dir/rtsan_interceptors_posix.cpp.o.d -o compiler-rt/lib/rtsan/CMakeFiles/RTRtsan.osx.dir/rtsan_interceptors_posix.cpp.o -c /Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp
/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp:301:13: error: unknown type name 'cookie_io_functions_t'
  301 |             cookie_io_functions_t funcs) {
      |             ^
/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp:301:13: error: unknown type name 'cookie_io_functions_t'
/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp:300:1: error: 'substitution_fopencookie' causes a section type conflict with 'substitution_open'
  300 | INTERCEPTOR(FILE *, fopencookie, void *cookie, const char *mode,
      | ^
/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/rtsan/../interception/interception.h:332:3: note: expanded from macro 'INTERCEPTOR'
  332 |   INTERCEPTOR_ZZZ(/*no symbol variants*/, ret_type, func, __VA_ARGS__)
      |   ^
/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/rtsan/../interception/interception.h:328:3: note: expanded from macro 'INTERCEPTOR_ZZZ'
  328 |   INTERPOSER(func);                                   \
      |   ^
/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/rtsan/../interception/interception.h:142:30: note: expanded from macro 'INTERPOSER'
  142 | const interpose_substitution substitution_##func_name[] \
      |                              ^
<scratch space>:74:1: note: expanded from here
   74 | substitution_fopencookie
      | ^
/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp:65:1: note: declared here
   65 | INTERCEPTOR(int, open, const char *path, int oflag, ...) {
      | ^
/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/rtsan/../interception/interception.h:332:3: note: expanded from macro 'INTERCEPTOR'
  332 |   INTERCEPTOR_ZZZ(/*no symbol variants*/, ret_type, func, __VA_ARGS__)
      |   ^
/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/rtsan/../interception/interception.h:328:3: note: expanded from macro 'INTERCEPTOR_ZZZ'
  328 |   INTERPOSER(func);                                   \
      |   ^
/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/rtsan/../interception/interception.h:142:30: note: expanded from macro 'INTERPOSER'
  142 | const interpose_substitution substitution_##func_name[] \
      |                              ^
<scratch space>:22:1: note: expanded from here
   22 | substitution_open
      | ^
/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/rtsan/rtsan_interceptors_posix.cpp:301:13: error: unknown type name 'cookie_io_functions_t'
  301 |             cookie_io_functions_t funcs) {
      |             ^
4 errors generated.
```
https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8726813137214075521/+/u/clang/build/stdout

https://github.com/llvm/llvm-project/pull/120864


More information about the llvm-commits mailing list