diff options
author | Kuba Mracek <mracek@apple.com> | 2017-02-22 01:13:34 +0000 |
---|---|---|
committer | Kuba Mracek <mracek@apple.com> | 2017-02-22 01:13:34 +0000 |
commit | e257e18436359d8a0636752e25e6db0f898b468a (patch) | |
tree | d8c8219295b52d23c061fa2023adaf9600ba8f93 /lib/tsan | |
parent | d0f13c24a3201a59d0a72ef0fcca6f2288e20293 (diff) |
Re-commit of r295318, which was reverted due to AArch64 flakiness. Moving the test to Darwin only.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@295801 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/tsan')
-rw-r--r-- | lib/tsan/rtl/tsan_debugging.cc | 10 | ||||
-rw-r--r-- | lib/tsan/rtl/tsan_interface.h | 4 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/tsan/rtl/tsan_debugging.cc b/lib/tsan/rtl/tsan_debugging.cc index 360879481..06154bc13 100644 --- a/lib/tsan/rtl/tsan_debugging.cc +++ b/lib/tsan/rtl/tsan_debugging.cc @@ -128,6 +128,16 @@ int __tsan_get_report_loc(void *report, uptr idx, const char **type, } SANITIZER_INTERFACE_ATTRIBUTE +int __tsan_get_report_loc_object_type(void *report, uptr idx, + const char **object_type) { + const ReportDesc *rep = (ReportDesc *)report; + CHECK_LT(idx, rep->locs.Size()); + ReportLocation *loc = rep->locs[idx]; + *object_type = GetObjectTypeFromTag(loc->external_tag); + return 1; +} + +SANITIZER_INTERFACE_ATTRIBUTE int __tsan_get_report_mutex(void *report, uptr idx, uptr *mutex_id, void **addr, int *destroyed, void **trace, uptr trace_size) { const ReportDesc *rep = (ReportDesc *)report; diff --git a/lib/tsan/rtl/tsan_interface.h b/lib/tsan/rtl/tsan_interface.h index e02888c63..496a8717f 100644 --- a/lib/tsan/rtl/tsan_interface.h +++ b/lib/tsan/rtl/tsan_interface.h @@ -132,6 +132,10 @@ int __tsan_get_report_loc(void *report, uptr idx, const char **type, int *fd, int *suppressable, void **trace, uptr trace_size); +SANITIZER_INTERFACE_ATTRIBUTE +int __tsan_get_report_loc_object_type(void *report, uptr idx, + const char **object_type); + // Returns information about mutexes included in the report. SANITIZER_INTERFACE_ATTRIBUTE int __tsan_get_report_mutex(void *report, uptr idx, uptr *mutex_id, void **addr, |