[all-commits] [llvm/llvm-project] 0aefc9: [asan][ubsan][test] Add weak attributes for dyld M...

Roy Sundahl via All-commits all-commits at lists.llvm.org
Wed Jul 13 11:52:53 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0aefc94651b0a0ae46741f622c7da276b3cfa698
      https://github.com/llvm/llvm-project/commit/0aefc94651b0a0ae46741f622c7da276b3cfa698
  Author: Roy Sundahl <rsundahl at apple.com>
  Date:   2022-07-13 (Wed, 13 Jul 2022)

  Changed paths:
    M compiler-rt/test/asan/TestCases/debug_double_free.cpp
    M compiler-rt/test/asan/TestCases/debug_report.cpp
    M compiler-rt/test/asan/TestCases/default_options.cpp
    M compiler-rt/test/asan/TestCases/on_error_callback.cpp
    M compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp

  Log Message:
  -----------
  [asan][ubsan][test] Add weak attributes for dyld Mach-O weak-def-coalescing

Apple's dynamic linker won't weak-def_coalesce from a file unless there is
at least one weak symbol in the compilation unit so  local __ubsan_on_report
never has the chance to override the weak one even though the dynamic linker
may see it first. This works around the issue by adding an unused weak symbol.
(Amended: Remove excessive clang-format artifacts)

rdar://95244261

Differential Revision: https://reviews.llvm.org/D127929




More information about the All-commits mailing list