[all-commits] [llvm/llvm-project] 325033: [asan] Disable instrumentation for available_exter...

Wu Yingcong via All-commits all-commits at lists.llvm.org
Tue Feb 27 12:52:16 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3250330997cf214293a20a1d532b617d72bafb09
      https://github.com/llvm/llvm-project/commit/3250330997cf214293a20a1d532b617d72bafb09
  Author: Wu Yingcong <yingcong.wu at intel.com>
  Date:   2024-02-27 (Tue, 27 Feb 2024)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
    A llvm/test/Instrumentation/AddressSanitizer/do-not-instrument-globals-windows.ll

  Log Message:
  -----------
  [asan] Disable instrumentation for available_externally global with COFF (#81109)

For COFF, available_externally global will be instrumented because of
the lack of filtering, and will trigger the Verifier pass assertion and
crash the compilation. This patch will filter out the
available_externally global for COFF.

For non-COFF, `!G->hasExactDefinition()` in line 1954 will filter out
the available_externally globals.

There is a related bug reported in
https://bugs.llvm.org/show_bug.cgi?id=47950 /
https://github.com/llvm/llvm-project/issues/47294. I tried the
reproducer posted on the page and this will fix the problem.

Reproducer:
```
#include <locale>

void grouping_impl() {
  std::use_facet<std::numpunct<char>>(std::locale());
}

// clang -fsanitize=address -D_DLL -std=c++14 -c format.cc
```



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list