[sanitizer] Skip /include/c++/ from summary (#78534)
commitecd47811b755d13357085bcd7519a66d6c4d8e5c
authorVitaly Buka <vitalybuka@google.com>
Thu, 18 Jan 2024 20:25:32 +0000 (18 12:25 -0800)
committerGitHub <noreply@github.com>
Thu, 18 Jan 2024 20:25:32 +0000 (18 12:25 -0800)
tree67457ab309811eac45f68248c9d7aed34bddedb5
parentc82b7fddfcbd6adfae4faf324a453fb8652efa91
[sanitizer] Skip /include/c++/ from summary (#78534)

std:: usually is not a cause of the bug.

We now display
```
SUMMARY: AddressSanitizer: allocation-size-too-big path/to/allocator_returns_null.cpp:92:7 in main
```
instead of

```
SUMMARY: AddressSanitizer: allocation-size-too-big /usr/lib/../include/c++/13/bits/new_allocator.h:147:27 in std::__new_allocator<char>::allocate(unsigned long, void const*)
```

`/include/c++/` matches both libc++ and libstdc++ include paths.
compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_report.cpp
compiler-rt/test/sanitizer_common/TestCases/allocator_returns_null.cpp