diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2015-04-06 12:49:30 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2015-04-06 12:49:30 +0000 |
commit | 9860ff2226cd43efa0e8d5c7056e800f7e9a22ea (patch) | |
tree | cd24d68911fb27ad965628884c827f29aa55f4b7 /lib/sanitizer_common/sanitizer_common.cc | |
parent | 0bca6b4e196838da6c317a0786b1927d0dcc9296 (diff) |
[ASan] Unify handling of loaded modules between POSIX and Windows
Reviewed at http://reviews.llvm.org/D8805
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@234150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_common.cc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_common.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sanitizer_common/sanitizer_common.cc b/lib/sanitizer_common/sanitizer_common.cc index 4281f2878..f78c965a1 100644 --- a/lib/sanitizer_common/sanitizer_common.cc +++ b/lib/sanitizer_common/sanitizer_common.cc @@ -250,14 +250,15 @@ void ReportErrorSummary(const char *error_type, const AddressInfo &info) { } #endif -LoadedModule::LoadedModule(const char *module_name, uptr base_address) { +void LoadedModule::set(const char *module_name, uptr base_address) { + clear(); full_name_ = internal_strdup(module_name); base_address_ = base_address; - ranges_.clear(); } void LoadedModule::clear() { InternalFree(full_name_); + full_name_ = nullptr; while (!ranges_.empty()) { AddressRange *r = ranges_.front(); ranges_.pop_front(); |