llvm-project/compiler-rt/test/asan/TestCases/Posix
Dan Liew c3b93bed29 [asan_symbolize] Fix bug where the frame counter was not incremented.
Summary:
This bug occurred when a plug-in requested that a binary not be
symbolized while the script is trying to symbolize a stack frame. In
this case `self.frame_no` would not be incremented. This would cause
subsequent stack frames that are symbolized to be incorrectly numbered.

To fix this `get_symbolized_lines()` has been modified to take an
argument that indicates whether the stack frame counter should
incremented. In `process_line_posix()` `get_symbolized_lines(None, ...)`
is now used in in the case where we don't want to symbolize a line so
that we can keep the frame counter increment in a single function.

A test case is included. The test uses a dummy plugin that always asks
`asan_symbolize.py` script to not symbolize the first binary that the
script asks about. Prior to the patch this would cause the output to
script to look something like

```
  #0 0x0
  #0 0x0 in do_access
  #1 0x0 in main
```

This is the second attempt at landing this patch. The first (r368373)
failed due to failing some android bots and so was reverted in r368472.
The new test is now disabled for Android. It turns out that the patch
also fails for iOS too so it is also disabled for that family of
platforms too.

rdar://problem/49476995

Reviewers: kubamracek, yln, samsonov, dvyukov, vitalybuka

Subscribers: #sanitizers, llvm-commits

Tags: #llvm, #sanitizers

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

llvm-svn: 368603
2019-08-12 18:51:25 +00:00
..
asan_symbolize_script [asan_symbolize] Fix bug where the frame counter was not incremented. 2019-08-12 18:51:25 +00:00
glob_test_root
asan-sigbus.cpp [Asan][Msan] Unit tests Disable some tests for FreeBSD 2018-07-25 12:38:23 +00:00
asan-symbolize-bad-path.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
asan-symbolize-sanity-test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
asprintf.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
assign_large_valloc_to_global.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
bcmp_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
closed-fds.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
concurrent_overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
coverage-fork.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
coverage-module-unloaded.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
coverage-reset.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
coverage.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
current_allocated_bytes.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
deep_call_stack.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
deep_thread_stack.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
dlclose-test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
fgets_fputs.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
fread_fwrite.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
free_hook_realloc.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
freopen.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
gc-test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
glob.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
global-registration.c Move -ldl to the correct compiler invocation 2016-06-27 05:44:47 +00:00
halt_on_error-signals.c [asan] Remove "rm -f" in tests where it was needed only because of >> 2017-09-21 00:06:08 +00:00
halt_on_error-torture.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
halt_on_error_suppress_equal_pcs.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
handle_abort_on_error.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
init-order-pthread-create.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
interception-in-shared-lib-test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
invalid-pointer-pairs-threads.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
ioctl.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
large_allocator_unpoisons_on_free.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
lit.local.cfg.py [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.* 2019-06-27 20:56:04 +00:00
log_path_fork_test.cc.disabled
lto-constmerge-odr.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
mmap_limit_mb.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
new_array_cookie_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
new_array_cookie_uaf_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
new_array_cookie_with_new_from_class.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
no-fd.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
no_asan_gen_globals.c Rename __asan_gen_* symbols to ___asan_gen_*. 2018-07-18 22:23:14 +00:00
print_cmdline.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
readv.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
shared-lib-test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
stack-overflow.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
stack-use-after-return.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
start-deactivated.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strchr.c [asan] Optimize strchr for strict_string_checks=false 2017-04-21 19:39:46 +00:00
strerror_r_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strndup_oob_test.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
strndup_oob_test2.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
tsd_dtor_leak.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
wait.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
wait3.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
wait4.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
waitid.cpp compiler-rt: Rename cc files below test/asan to cpp 2019-08-05 16:48:12 +00:00
wcrtomb.c [Sanitizer] Make wcrtomb test posix-only 2019-04-08 09:13:13 +00:00