File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 2121#ifdef TYPEART_PHMAP
2222#error TypeART-RT: Set ABSL and PHMAP, mutually exclusive.
2323#endif
24+
2425#pragma GCC diagnostic push
2526#pragma GCC diagnostic ignored "-Wpedantic"
2627#pragma GCC diagnostic ignored "-Wshadow"
4950#include " safe_ptr.h"
5051#endif
5152
53+ #if defined(__has_feature)
54+ #if __has_feature(address_sanitizer)
55+ #define __SANITIZE_ADDRESS__
56+ #endif
57+ #endif
58+
5259#include < cstddef> // size_t
5360#include < cstdint>
5461#include < vector>
@@ -88,7 +95,11 @@ struct RuntimeT {
8895#ifdef TYPEART_ABSEIL
8996 using PointerMapBaseT = absl::btree_map<MemAddr, PointerInfo>;
9097 template <class K , class V >
91- using HashmapT = absl::flat_hash_map<K, V>;
98+ #ifdef __SANITIZE_ADDRESS__
99+ using HashmapT = std::unordered_map<K, V>;
100+ #else
101+ using HashmapT = absl::flat_hash_map<K, V>;
102+ #endif
92103 static constexpr char MapName[] = " absl::btree_map" ;
93104#endif
94105#if !defined(TYPEART_PHMAP) && !defined(TYPEART_ABSEIL)
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ if config.asan:
4343 config.available_features.add(' asan' )
4444if config.ubsan:
4545 config.available_features.add(' ubsan' )
46+ # config.environment['UBSAN_OPTIONS'] = 'silence_unsigned_overflow=1'
4647if config.tsan:
4748 config.available_features.add(' tsan' )
4849if config.tsan or config.asan or config.ubsan:
You can’t perform that action at this time.
0 commit comments