mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-10-09 20:34:54 +00:00
[sanitizer] Fix Darwin build
llvm-svn: 328417
This commit is contained in:
parent
097b47a0fc
commit
f791c9659b
@ -344,9 +344,9 @@ uptr GetPageSize() {
|
||||
return sysconf(_SC_PAGESIZE);
|
||||
}
|
||||
|
||||
extern unsigned malloc_num_zones;
|
||||
extern malloc_zone_t **malloc_zones;
|
||||
static malloc_zone_t sanitizer_zone;
|
||||
extern "C" unsigned malloc_num_zones;
|
||||
extern "C" malloc_zone_t **malloc_zones;
|
||||
malloc_zone_t sanitizer_zone;
|
||||
|
||||
// We need to make sure that sanitizer_zone is registered as malloc_zones[0]. If
|
||||
// libmalloc tries to set up a different zone as malloc_zones[0], it will call
|
||||
|
@ -29,6 +29,10 @@
|
||||
// Similar code is used in Google Perftools,
|
||||
// https://github.com/gperftools/gperftools.
|
||||
|
||||
namespace __sanitizer {
|
||||
extern malloc_zone_t sanitizer_zone;
|
||||
}
|
||||
|
||||
INTERCEPTOR(malloc_zone_t *, malloc_create_zone,
|
||||
vm_size_t start_size, unsigned zone_flags) {
|
||||
COMMON_MALLOC_ENTER();
|
||||
|
Loading…
Reference in New Issue
Block a user