[PATCH] D88361: [sanitizer] Skip stack symbolization when not required for print format

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 8 10:17:42 PDT 2020


tejohnson added a comment.

In D88361#2319693 <https://reviews.llvm.org/D88361#2319693>, @leonardchan wrote:

> Hi! It seems that this change is leading to the undefined symbol errors we're seeing on our builders (https://luci-milo.appspot.com/p/fuchsia/builders/ci/clang-linux-x64/b8867057367989385504):
>
>   [716/753] Linking CXX shared library /b/s/w/ir/x/w/staging/llvm_build/lib/clang/12.0.0/lib/x86_64-unknown-fuchsia/libclang_rt.asan.so
>   FAILED: /b/s/w/ir/x/w/staging/llvm_build/lib/clang/12.0.0/lib/x86_64-unknown-fuchsia/libclang_rt.asan.so 
>   ...
>   ld.lld: error: undefined symbol: __sanitizer::RenderNeedsSymbolization(char const*)
>   >>> referenced by sanitizer_stacktrace_libcdep.cpp:29 (compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp:29)
>   >>>               compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_stacktrace_libcdep.cpp.obj:(__sanitizer::StackTrace::Print() const)
>   >>> referenced by sanitizer_stacktrace_libcdep.cpp:118 (compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp:118)
>   >>>               compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_stacktrace_libcdep.cpp.obj:(__sanitizer_symbolize_pc)
>   
>   ld.lld: error: undefined symbol: __sanitizer::RenderFrame(__sanitizer::InternalScopedString*, char const*, int, unsigned long, __sanitizer::AddressInfo const*, bool, char const*, char const*)
>   >>> referenced by sanitizer_stacktrace_libcdep.cpp:43 (compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp:43)
>   >>>               compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_stacktrace_libcdep.cpp.obj:(__sanitizer::StackTrace::Print() const)
>   >>> referenced by sanitizer_stacktrace_libcdep.cpp:135 (compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cpp:135)
>   >>>               compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_stacktrace_libcdep.cpp.obj:(__sanitizer_symbolize_pc)
>   >>> referenced by sanitizer_symbolizer_report.cpp:36 (compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp:36)
>   >>>               compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonSymbolizer.x86_64.dir/sanitizer_symbolizer_report.cpp.obj:(__sanitizer::ReportErrorSummary(char const*, __sanitizer::AddressInfo const&, char const*))
>
> Could you take a look? Thanks.

I see the issue. Fuschia uses a different implementation of RenderFrame, I'll need to update that one too and add a dummy version of the new RenderNeedsSymbolization as well (looks like this version in sanitizer_symbolizer_markup.cpp is quite simple and doesn't attempt to symbolize at all, so RenderNeedsSymbolization can simply return false). Fix coming up.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88361/new/

https://reviews.llvm.org/D88361



More information about the llvm-commits mailing list