History log of /llvm-project/compiler-rt/test/asan/TestCases/Linux/odr_indicators.cpp (Results 1 – 11 of 11)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4
# e185850c 24-Aug-2024 Vitaly Buka <vitalybuka@google.com>

Revert ""Reland "[asan] Remove debug tracing from `report_globals` (#104404)"" (#105926)

Reverts llvm/llvm-project#105895

Still breaks the test
https://green.lab.llvm.org/job/llvm.org/job/clang-

Revert ""Reland "[asan] Remove debug tracing from `report_globals` (#104404)"" (#105926)

Reverts llvm/llvm-project#105895

Still breaks the test
https://green.lab.llvm.org/job/llvm.org/job/clang-stage1-RA/1864/

show more ...


# 10407be5 23-Aug-2024 Vitaly Buka <vitalybuka@google.com>

"Reland "[asan] Remove debug tracing from `report_globals` (#104404)" (#105895)

Reland #104404.

In addition to #104404 it raises required
verbosity for stack tracing on global
registration. It

"Reland "[asan] Remove debug tracing from `report_globals` (#104404)" (#105895)

Reland #104404.

In addition to #104404 it raises required
verbosity for stack tracing on global
registration. It confuses a symbolizer test on
Darwin.

This reverts commit 6a8f73803a32db75d22490d341bf8744722a9025.

show more ...


# 6a8f7380 23-Aug-2024 Hans Wennborg <hans@chromium.org>

Revert "Reland "[asan] Remove debug tracing from `report_globals` (#104404)" (#105601)"

that change still breaks

SanitizerCommon-asan-x86_64-Darwin :: Darwin/print-stack-trace-in-code-loaded-afte

Revert "Reland "[asan] Remove debug tracing from `report_globals` (#104404)" (#105601)"

that change still breaks

SanitizerCommon-asan-x86_64-Darwin :: Darwin/print-stack-trace-in-code-loaded-after-fork.cpp

> This reverts commit 2704b804bec50c2b016bf678bd534c330ec655b6
> and relands #104404.
>
> The Darwin should not fail after #105599.

This reverts commit 8c6f8c29e90666b747fc4b4612647554206a2be5.

show more ...


# 8c6f8c29 22-Aug-2024 Vitaly Buka <vitalybuka@google.com>

Reland "[asan] Remove debug tracing from `report_globals` (#104404)" (#105601)

This reverts commit 2704b804bec50c2b016bf678bd534c330ec655b6
and relands #104404.

The Darwin should not fail after

Reland "[asan] Remove debug tracing from `report_globals` (#104404)" (#105601)

This reverts commit 2704b804bec50c2b016bf678bd534c330ec655b6
and relands #104404.

The Darwin should not fail after #105599.

show more ...


# 2704b804 21-Aug-2024 Hans Wennborg <hans@chromium.org>

Revert "[asan] Remove debug tracing from `report_globals` (#104404)"

This caused

SanitizerCommon-asan-x86_64-Darwin :: Darwin/print-stack-trace-in-code-loaded-after-fork.cpp

to fail, see comment

Revert "[asan] Remove debug tracing from `report_globals` (#104404)"

This caused

SanitizerCommon-asan-x86_64-Darwin :: Darwin/print-stack-trace-in-code-loaded-after-fork.cpp

to fail, see comment on the PR.

> Printing globals registration is internal debug
> tracing and should be controlled with verbosity.

This reverts commit 68f6e7467651f38e0b97343bfbc49e0ce69eaedf and
follow-up commit ef6760116fa2fa21f78e7a3b499f77e1a3eb7b92.

show more ...


Revision tags: llvmorg-19.1.0-rc3
# 68f6e746 16-Aug-2024 Vitaly Buka <vitalybuka@google.com>

[asan] Remove debug tracing from `report_globals` (#104404)

Printing globals registration is internal debug
tracing and should be controlled with verbosity.


Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5
# ee7d41d1 10-Nov-2023 Fangrui Song <i@maskray.me>

[asan] Report executable/DSO name for report_globals=2 and odr-violation checking (#71879)

For an odr-violation error due to a source file linked into two DSOs, or
one DSO and the main executable,

[asan] Report executable/DSO name for report_globals=2 and odr-violation checking (#71879)

For an odr-violation error due to a source file linked into two DSOs, or
one DSO and the main executable, it can be difficult to identify the DSO
name. Let's print the module name in the error report.

```
echo 'extern long var; int main() { return var; }' > a.cc
echo 'long var;' > b.cc
clang++ -fpic -fsanitize=address -shared b.cc -o b.so
clang++ -fsanitize=address a.cc b.cc ./b.so -o a
```

w/o this patch:
```
==1375386==ERROR: AddressSanitizer: odr-violation (0x56067cb06240):
[1] size=8 'var' b.cc
[2] size=8 'var' b.cc
...
```
w/ this patch:
```
==1375386==ERROR: AddressSanitizer: odr-violation (0x56067cb06240):
[1] size=8 'var' b.cc in /tmp/c/a
[2] size=8 'var' b.cc in ./b.so
```

In addition, update the `report_globals=2` message to include the module
name
```
==1451005==Added Global[0x7fcfe59ae040]: beg=0x7fcfe59ae140 size=8/32 name=var source=b.cc module=./b.so dyn_init=0 odr_indicator=0x55754f939260
```

show more ...


Revision tags: llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6
# db7c8223 21-Nov-2022 Fangrui Song <i@maskray.me>

Restore global descriptor demangling after D138095 "[asan] Keep Itanium mangled names in global metadata"

This amends commit 00be3578e0841dd9abe408e5b4946180de0bf46b to demangle symbol
names in glob

Restore global descriptor demangling after D138095 "[asan] Keep Itanium mangled names in global metadata"

This amends commit 00be3578e0841dd9abe408e5b4946180de0bf46b to demangle symbol
names in global descriptors. We keep the mangled name for the `__odr_gen_asan_*`
variables and the runtime __cxa_demangle call site change (which fixed possible
leaks for other scenarios: non-fatal diagnostics).

compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp uses
an undefined weak `__cxa_demangle` which does not pull in an archive definition.
A -static-libstdc++ executable link does not get demangled names.

Unfortunately this means we cannot rely on runtime demangling.
See compiler-rt/test/asan/TestCases/global-demangle.cpp

show more ...


# 00be3578 19-Nov-2022 Fangrui Song <i@maskray.me>

[asan] Keep Itanium mangled names in global metadata

The runtime calls `MaybeDemangleGlobalName` for error reporting and
`__cxxabiv1::__cxa_demangle` is called if available, so demanging Itanium
man

[asan] Keep Itanium mangled names in global metadata

The runtime calls `MaybeDemangleGlobalName` for error reporting and
`__cxxabiv1::__cxa_demangle` is called if available, so demanging Itanium
mangled names in global metadata is unnecessary and wastes data size.

Add `MaybeDemangleGlobalName` in ODR violation detection to support demangled
names in a suppressions file. `MaybeDemangleGlobalName` may call
`DemangleCXXABI` and leak memory. Use an internal allocation to prevent lsan
leak (in case there is no fatal asan error).

The debug feature `report_globals=2` prints information for all instrumented
global variables. `MaybeDemangleGlobalName` would be slow, so don't do that.
The output looks like `Added Global[0x56448f092d60]: beg=0x56448fa66d60 size=4/32 name=_ZL13test_global_2`
and I think the mangled name is fine.

Other mangled schemes e.g. Windows (see win-string-literal.ll) remain the
current behavior.

Reviewed By: hctim

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

show more ...


Revision tags: llvmorg-15.0.5
# 1ada819c 03-Nov-2022 Fangrui Song <i@maskray.me>

[asan] Default to -fsanitize-address-use-odr-indicator for non-Windows

This enables odr indicators on all platforms and private aliases on non-Windows.
Note that GCC also uses private aliases: this

[asan] Default to -fsanitize-address-use-odr-indicator for non-Windows

This enables odr indicators on all platforms and private aliases on non-Windows.
Note that GCC also uses private aliases: this fixes bogus
`The following global variable is not properly aligned.` errors for interposed global variables

Fix https://github.com/google/sanitizers/issues/398
Fix https://github.com/google/sanitizers/issues/1017
Fix https://github.com/llvm/llvm-project/issues/36893 (we can restore D46665)

Global variables of non-hasExactDefinition() linkages (i.e.
linkonce/linkonce_odr/weak/weak_odr/common/external_weak) are not instrumented.
If an instrumented variable gets interposed to an uninstrumented variable due to
symbol interposition (e.g. in issue 36893, _ZTS1A in foo.so is resolved to _ZTS1A in
the executable), there may be a bogus error.

With private aliases, the register code will not resolve to a definition in
another module, and thus prevent the issue.

Cons: minor size increase. This is mainly due to extra `__odr_asan_gen_*` symbols.
(ELF) In addition, in relocatable files private aliases replace some relocations
referencing global symbols with .L symbols and may introduce some STT_SECTION symbols.

For lld, with -g0, the size increase is 0.07~0.09% for many configurations I
have tested: -O0, -O1, -O2, -O3, -O2 -ffunction-sections -fdata-sections
-Wl,--gc-sections. With -g1 or above, the size increase ratio will be even smaller.

This patch obsoletes D92078.

Don't migrate Windows for now: the static data member of a specialization
`std::num_put<char>::id` is a weak symbol, as well as its ODR indicator.
Unfortunately, link.exe (and lld without -lldmingw) generally doesn't support
duplicate weak definitions (weak symbols in different TUs likely pick different
defined external symbols and conflict).

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

show more ...


Revision tags: llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2, llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2, llvmorg-10.0.1-rc1, llvmorg-10.0.0, llvmorg-10.0.0-rc6, llvmorg-10.0.0-rc5, llvmorg-10.0.0-rc4, llvmorg-10.0.0-rc3, llvmorg-10.0.0-rc2, llvmorg-10.0.0-rc1, llvmorg-11-init, llvmorg-9.0.1, llvmorg-9.0.1-rc3, llvmorg-9.0.1-rc2, llvmorg-9.0.1-rc1, llvmorg-9.0.0, llvmorg-9.0.0-rc6, llvmorg-9.0.0-rc5, llvmorg-9.0.0-rc4, llvmorg-9.0.0-rc3, llvmorg-9.0.0-rc2
# 673dc3d4 05-Aug-2019 Nico Weber <nicolasweber@gmx.de>

compiler-rt: Rename cc files below test/asan to cpp

See r367803 and similar other changes.

llvm-svn: 367887