Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit ae51c27

Browse files
committed
Speculatively revert asan coverage changes 194702-194704.
Apple's bootstrapped LTO builds have been failing, and these changes (along with llvm 194701) are the only things on the blamelist. I will either reapply these changes or help debug the problem, depending on whether this fixes the buildbots. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@194779 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent e767e35 commit ae51c27

File tree

10 files changed

+12
-189
lines changed

10 files changed

+12
-189
lines changed

include/sanitizer/common_interface_defs.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,6 @@ extern "C" {
4747
void __sanitizer_unaligned_store32(void *p, uint32_t x);
4848
void __sanitizer_unaligned_store64(void *p, uint64_t x);
4949

50-
// Record and dump coverage info.
51-
void __sanitizer_cov_dump();
52-
5350
#ifdef __cplusplus
5451
} // extern "C"
5552
#endif

lib/asan/asan_flags.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,6 @@ struct Flags {
8383
bool print_legend;
8484
// If set, prints ASan exit stats even after program terminates successfully.
8585
bool atexit;
86-
// If set, coverage information will be dumped at shutdown time if the
87-
// appropriate instrumentation was enabled.
88-
bool coverage;
8986
// By default, disable core dumper on 64-bit - it makes little sense
9087
// to dump 16T+ core.
9188
bool disable_core;

lib/asan/asan_rtl.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@ static void ParseFlagsFromString(Flags *f, const char *str) {
120120
ParseFlag(str, &f->print_stats, "print_stats");
121121
ParseFlag(str, &f->print_legend, "print_legend");
122122
ParseFlag(str, &f->atexit, "atexit");
123-
ParseFlag(str, &f->coverage, "coverage");
124123
ParseFlag(str, &f->disable_core, "disable_core");
125124
ParseFlag(str, &f->allow_reexec, "allow_reexec");
126125
ParseFlag(str, &f->print_full_thread_history, "print_full_thread_history");
@@ -162,7 +161,6 @@ void InitializeFlags(Flags *f, const char *env) {
162161
f->print_stats = false;
163162
f->print_legend = true;
164163
f->atexit = false;
165-
f->coverage = false;
166164
f->disable_core = (SANITIZER_WORDSIZE == 64);
167165
f->allow_reexec = true;
168166
f->print_full_thread_history = true;
@@ -543,9 +541,6 @@ void __asan_init() {
543541
if (flags()->atexit)
544542
Atexit(asan_atexit);
545543

546-
if (flags()->coverage)
547-
Atexit(__sanitizer_cov_dump);
548-
549544
// interceptors
550545
InitTlsSize();
551546

lib/asan/lit_tests/TestCases/Linux/coverage.cc

Lines changed: 0 additions & 45 deletions
This file was deleted.

lib/sanitizer_common/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
set(SANITIZER_SOURCES
55
sanitizer_allocator.cc
66
sanitizer_common.cc
7-
sanitizer_coverage.cc
87
sanitizer_flags.cc
98
sanitizer_libc.cc
109
sanitizer_libignore.cc

lib/sanitizer_common/sanitizer_common.cc

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -226,17 +226,6 @@ bool LoadedModule::containsAddress(uptr address) const {
226226
return false;
227227
}
228228

229-
char *StripModuleName(const char *module) {
230-
if (module == 0)
231-
return 0;
232-
const char *short_module_name = internal_strrchr(module, '/');
233-
if (short_module_name)
234-
short_module_name += 1;
235-
else
236-
short_module_name = module;
237-
return internal_strdup(short_module_name);
238-
}
239-
240229
} // namespace __sanitizer
241230

242231
using namespace __sanitizer; // NOLINT

lib/sanitizer_common/sanitizer_common.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,6 @@ void SleepForMillis(int millis);
180180
u64 NanoTime();
181181
int Atexit(void (*function)(void));
182182
void SortArray(uptr *array, uptr size);
183-
// Strip the directories from the module name, return a new string allocated
184-
// with internal_strdup.
185-
char *StripModuleName(const char *module);
186183

187184
// Exit
188185
void NORETURN Abort();
@@ -362,8 +359,6 @@ class InternalMmapVector {
362359
return capacity_;
363360
}
364361

365-
void clear() { size_ = 0; }
366-
367362
private:
368363
void Resize(uptr new_capacity) {
369364
CHECK_GT(new_capacity, 0);

lib/sanitizer_common/sanitizer_coverage.cc

Lines changed: 0 additions & 113 deletions
This file was deleted.

lib/sanitizer_common/sanitizer_internal_defs.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,6 @@ extern "C" {
110110
// the error message. This function can be overridden by the client.
111111
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
112112
void __sanitizer_report_error_summary(const char *error_summary);
113-
114-
SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_cov_dump();
115-
SANITIZER_INTERFACE_ATTRIBUTE void __sanitizer_cov(void *pc);
116113
} // extern "C"
117114

118115

lib/tsan/rtl/tsan_symbolize.cc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,18 @@ ReportStack *NewReportStackEntry(uptr addr) {
4242
return ent;
4343
}
4444

45+
// Strip module path to make output shorter.
46+
static char *StripModuleName(const char *module) {
47+
if (module == 0)
48+
return 0;
49+
const char *short_module_name = internal_strrchr(module, '/');
50+
if (short_module_name)
51+
short_module_name += 1;
52+
else
53+
short_module_name = module;
54+
return internal_strdup(short_module_name);
55+
}
56+
4557
static ReportStack *NewReportStackEntry(const AddressInfo &info) {
4658
ReportStack *ent = NewReportStackEntry(info.address);
4759
ent->module = StripModuleName(info.module);

0 commit comments

Comments
 (0)