Commit Graph

18 Commits

Author SHA1 Message Date
Vitaly Buka 7cd7b4d2f8 [sanitizer] Add common "demangle" flag
Reviewed By: browneee

Differential Revision: https://reviews.llvm.org/D116202
2021-12-23 14:36:39 -08:00
Vitaly Buka 9fe0d67c9a [sanitizer] Check kArgVMax in SymbolizerProcess::GetArgV 2021-12-23 11:05:37 -08:00
Vitaly Buka 4126b08662 [NFC][sanitizer] Format a part of the file 2021-12-22 21:25:51 -08:00
Florian Mayer edd2b99a57 [sanitizers] include build ids in stacks on linux.
Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D114294
2021-12-10 14:24:03 -08:00
Florian Mayer 06430acc00 Revert "[sanitizers] include build ids in stacks on linux."
This reverts commit 2a31b240df.
2021-12-10 11:52:26 -08:00
Florian Mayer 2a31b240df [sanitizers] include build ids in stacks on linux.
Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D114294
2021-12-10 11:30:34 -08:00
Dmitry Vyukov 4e15ee2867 sanitizer_common: remove BlockingMutex and RWMutex
Remove the legacy typedefs and use Mutex/Lock types directly.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D107043
2021-07-29 12:38:53 +02:00
Vyacheslav Chigrin f79937140d [sanitizer] Fix crash on empty strings.
Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D95431
2021-01-27 13:22:43 -08:00
Evgenii Stepanov e53247ca42 Revert "[sanitizer] Fix crash on empty strings."
Wrong author name, will recommit shortly.

This reverts commit 262c50856a.
2021-01-27 13:22:43 -08:00
Evgenii Stepanov 262c50856a [sanitizer] Fix crash on empty strings.
Patch by Vyacheslav Chigrin.

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D95431
2021-01-27 13:08:10 -08:00
Vitaly Buka d48f2d7c02 [sanitizer] Cleanup -Wnon-virtual-dtor warnings 2020-11-02 20:30:50 -08:00
Alexey Baturo 7ce4dfb4dd [RISCV][ASAN] support code for architecture-specific parts of asan
[9/11] patch series to port ASAN for riscv64

Depends On D87579

Reviewed By: luismarques

Differential Revision: https://reviews.llvm.org/D87580
2020-10-04 15:21:48 +03:00
Fangrui Song e4441fc653 sanitizer_symbolizer_libcdep.cpp: Change --inlining=true to --inlines and --inlining=false to --no-inlines 2020-08-04 10:24:59 -07:00
Max Moroz 405093045f [compiler-rt] Follow up fix for the refactoring in https://reviews.llvm.org/D74137.
Summary:
The refactoring has caused a failure in
http://lab.llvm.org:8011/builders/clang-ppc64le-linux/builds/29265

The idea of failing the symbolization when the symbolizer bufer is too small
was incorrect. The symbolizer can be invoked for other frames that may fit into
the buffer and get symbolized.

Reviewers: vitalybuka, eugenis

Subscribers: dberris, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D74343
2020-02-10 10:28:06 -08:00
Max Moroz 5ad62d3b7f [compiler-rt] Some clean up / refactoring in sanitizer_symbolizer_libcdep.cpp.
Summary:
Nothing critical, just a few potential improvements I've noticed while reading
the code:
- return `false` when symbolizer buffer is too small to read all data
- invert some conditions to reduce indentation
- prefer `nullptr` over `0` for pointers; init some pointers on stack;
- remove minor code duplication

Reviewers: eugenis, vitalybuka

Subscribers: dberris, #sanitizers, llvm-commits, kcc

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D74137
2020-02-10 06:50:59 -08:00
Julian Lettner bb99437f6d [sanitizer_common] Always use posix_spawn on Darwin
On Darwin we have two external symbolizers: atos and llvm-symbolizer.
atos was changed to use posix_spawn (instead of fork+execv) in a
previous commit [1]. Let's use posix_spawn for llvm-symbolizer as well.

Our hope is that eventually we can transition to posix_spawn on other
platforms too.

[1] 399408a92f

llvm-svn: 369021
2019-08-15 17:25:10 +00:00
Julian Lettner 399408a92f [sanitizer_common] Replace forkpty with posix_spawn on Darwin
On Darwin, we currently use forkpty to communicate with the "atos"
symbolizer. There are several problems that fork[pty] has, e.g. that
after fork, interceptors are still active and this sometimes causes
crashes or hangs. This is especially problematic for TSan, which uses
interceptors for OS-provided locks and mutexes, and even Libc functions
use those.

This patch replaces forkpty with posix_spawn on Darwin. Since
posix_spawn doesn't fork (at least on Darwin), the interceptors are not
a problem. Another benefit is that we'll handle post-fork failures (e.g.
sandbox disallows "exec") gracefully now.

Related revisions and previous attempts that were blocked by or had to
be revered due to test failures:
https://reviews.llvm.org/D48451
https://reviews.llvm.org/D40032

Reviewed By: kubamracek

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

llvm-svn: 368947
2019-08-15 00:18:55 +00:00
Nico Weber 65492d959b compiler-rt: Rename .cc file in lib/sanitizer_common to .cpp
See https://reviews.llvm.org/D58620 for discussion, and for the commands
I ran. In addition I also ran

  for f in $(svn diff | diffstat | grep .cc | cut -f 2 -d ' '); do rg $f . ; done

and manually updated (many) references to renamed files found by that.

llvm-svn: 367463
2019-07-31 18:51:27 +00:00