[all-commits] [llvm/llvm-project] b6099f: [darwin][asan] add test for application specific i...

Emily Shi via All-commits all-commits at lists.llvm.org
Tue Feb 23 09:24:01 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b6099fa515b1c0bb80d2347a836c01c65d7bc253
      https://github.com/llvm/llvm-project/commit/b6099fa515b1c0bb80d2347a836c01c65d7bc253
  Author: Emily Shi <code at emi.sh>
  Date:   2021-02-23 (Tue, 23 Feb 2021)

  Changed paths:
    A compiler-rt/test/asan/TestCases/Darwin/asan_log_to_crashreporter.cpp
    M compiler-rt/test/lit.common.cfg.py
    A compiler-rt/test/sanitizer_common/ios_commands/get_pid_from_output.py
    A compiler-rt/test/sanitizer_common/ios_commands/print_crashreport_for_pid.py

  Log Message:
  -----------
  [darwin][asan] add test for application specific information in crash logs

Added a lit test that finds its corresponding crash log and checks to make sure it has asn output under `Application Specific Information`.

This required adding two python commands:
- `get_pid_from_output`: takes the output from the asan instrumentation and parses out the process ID
- `print_crashreport_for_pid`: takes in the pid of the process and the file name of the binary that was run and prints the contents of the corresponding crash log.

This test was added in preparation for changing the integration with crash reporter from the old api to the new api, which is implemented in a subsequent commit.

rdar://69767688

Reviewed By: delcypher

Commited by Dan Liew on behalf of Emily Shi.

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


  Commit: 956c90d347be82a93b16c685c25d016018ed99bf
      https://github.com/llvm/llvm-project/commit/956c90d347be82a93b16c685c25d016018ed99bf
  Author: Emily Shi <code at emi.sh>
  Date:   2021-02-23 (Tue, 23 Feb 2021)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_mac.h

  Log Message:
  -----------
  [darwin] use new crash reporter api

Add support for the new crash reporter api if the headers are available. Falls back to the old API if they are not available. This change was based on [[ https://github.com/llvm/llvm-project/blob/0164d546d2691c439fc06c8fff126224276c2d02/llvm/lib/Support/PrettyStackTrace.cpp#L111 | /llvm/lib/Support/PrettyStackTrace.cpp ]]

There is a lit for this behavior here: https://reviews.llvm.org/D96737 but is not included in this diff because it is potentially flaky.

rdar://69767688

Reviewed By: delcypher, yln

Commited by Dan Liew on behalf of Emily Shi.

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


Compare: https://github.com/llvm/llvm-project/compare/a6be26710bbd...956c90d347be


More information about the All-commits mailing list