File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 4
4
#include < snmalloc/snmalloc.h>
5
5
#include < test/xoroshiro.h>
6
6
7
- #if __has_feature(address_sanitizer)
7
+ #if defined(__SANITIZE_ADDRESS__)
8
+ # define HAS_ASAN
9
+ #elif defined(__has_feature)
10
+ # if __has_feature(address_sanitizer)
11
+ # define HAS_ASAN
12
+ # endif
13
+ #endif
14
+
15
+ #if defined(HAS_ASAN)
8
16
# include < sanitizer/asan_interface.h>
9
17
// Asan does not appear to support a __asan_update_deallocation_context
10
18
# define VERONA_TRACK_FREE (ptr, size ) __asan_poison_memory_region(ptr, size);
11
19
# define VERONA_TRACK_ALLOC (ptr, size ) __asan_unpoison_memory_region(ptr, size); __asan_update_allocation_context(ptr);
12
20
# define VERONA_NO_SANITIZE_ADDRESS __attribute__ ((no_sanitize_address))
13
21
#else
14
- # define VERONA_POISON_MEMORY (ptr, size )
15
- # define VERONA_UNPOISON_MEMORY (ptr, size )
22
+ # define VERONA_TRACK_FREE (ptr, size )
23
+ # define VERONA_TRACK_ALLOC (ptr, size )
16
24
# define VERONA_NO_SANITIZE_ADDRESS
17
25
#endif
18
26
Original file line number Diff line number Diff line change @@ -47,6 +47,10 @@ int main(int argc, char** argv)
47
47
heap::set_seed (i + t);
48
48
test_replay ();
49
49
heap::debug_check_empty ();
50
+ if (i % 64 == 0 )
51
+ {
52
+ std::cout << std::endl;
53
+ }
50
54
}
51
55
52
56
std::cout << std::endl << " count: " << count << std::endl;
You can’t perform that action at this time.
0 commit comments