7 Commits

Author SHA1 Message Date
Vitaly Buka
e185850ce7
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/
2024-08-23 23:29:09 -07:00
Vitaly Buka
10407be542
"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.
2024-08-23 15:06:45 -07:00
Hans Wennborg
6a8f73803a 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.
2024-08-23 17:01:04 +02:00
Vitaly Buka
8c6f8c29e9
Reland "[asan] Remove debug tracing from report_globals (#104404)" (#105601)
This reverts commit 2704b804bec50c2b016bf678bd534c330ec655b6
and relands #104404.

The Darwin should not fail after #105599.
2024-08-22 08:51:47 -07:00
Hans Wennborg
2704b804be 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.
2024-08-21 14:31:36 +02:00
Vitaly Buka
68f6e74676
[asan] Remove debug tracing from report_globals (#104404)
Printing globals registration is internal debug
tracing and should be controlled with verbosity.
2024-08-15 17:14:14 -07:00
Vitaly Buka
29e849bfd3
[asan] Optimize initialization order checking (#101837)
The pair `__asan_before_dynamic_init` and `__asan_after_dynamic_init` is
executed for each TU. `__asan_after_dynamic_init` unpoisons all globals,
which
makes the time complexity O(N^2), where N is the maximum of the global
count and
the TU count. This is expensive for large binaries.

This patch decreases the time complexity to O(N), when lld and static
runtime is
used on SANITIZER_CAN_USE_PREINIT_ARRAY platforms. This requires:

Enabling incremental poisoning (`__asan_before_dynamic_init` since
https://github.com/llvm/llvm-project/pull/101597). Making most
`__asan_after_dynamic_init` calls do nothing.
2024-08-07 23:17:14 -07:00