[compiler-rt] [asan] Report executable/DSO name for report_globals=2 and odr-violation checking (PR #71879)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 9 16:00:20 PST 2023
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff 51af040b22c117e4f2429277c515299cd62c58ea ddb807b4a14022f87482680335ca628d7bbd01fc -- compiler-rt/lib/asan/asan_descriptions.cpp compiler-rt/lib/asan/asan_errors.cpp compiler-rt/lib/asan/asan_globals.cpp compiler-rt/lib/asan/asan_report.h compiler-rt/test/asan/TestCases/Linux/odr-violation.cpp compiler-rt/test/asan/TestCases/Linux/odr_indicators.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/compiler-rt/lib/asan/asan_globals.cpp b/compiler-rt/lib/asan/asan_globals.cpp
index 1923d23c4200..9c95dd58661b 100644
--- a/compiler-rt/lib/asan/asan_globals.cpp
+++ b/compiler-rt/lib/asan/asan_globals.cpp
@@ -299,7 +299,8 @@ void PrintGlobalNameIfASCII(InternalScopedString *str, const __asan_global &g) {
(char *)g.beg);
}
-void PrintGlobalLocation(InternalScopedString *str, const __asan_global &g, bool print_module_name) {
+void PrintGlobalLocation(InternalScopedString *str, const __asan_global &g,
+ bool print_module_name) {
DataInfo info;
if (Symbolizer::GetOrInit()->SymbolizeData(g.beg, &info) && info.line != 0) {
str->AppendF("%s:%d", info.file, static_cast<int>(info.line));
diff --git a/compiler-rt/lib/asan/asan_report.h b/compiler-rt/lib/asan/asan_report.h
index e1d9770369fb..3540b3b4b1bf 100644
--- a/compiler-rt/lib/asan/asan_report.h
+++ b/compiler-rt/lib/asan/asan_report.h
@@ -35,7 +35,8 @@ int GetGlobalsForAddress(uptr addr, __asan_global *globals, u32 *reg_sites,
const char *MaybeDemangleGlobalName(const char *name);
void PrintGlobalNameIfASCII(InternalScopedString *str, const __asan_global &g);
-void PrintGlobalLocation(InternalScopedString *str, const __asan_global &g, bool print_module_name);
+void PrintGlobalLocation(InternalScopedString *str, const __asan_global &g,
+ bool print_module_name);
void PrintMemoryByte(InternalScopedString *str, const char *before, u8 byte,
bool in_shadow, const char *after = "\n");
``````````
</details>
https://github.com/llvm/llvm-project/pull/71879
More information about the llvm-commits
mailing list