macos: fix error due to const argument to mi_atomic_load_relaxed:

- error: address argument to atomic operation must be a pointer to
  non-const _Atomic type ('const _Atomic(mi_threadid_t) *' invalid)
This commit is contained in:
Michael Clark 2022-01-18 11:34:51 +13:00
parent 38a03229c8
commit 910eb728a3
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 6BF1D7B357EF3E4F

View file

@ -486,7 +486,7 @@ void mi_free(void* p) mi_attr_noexcept
mi_page_t* const page = _mi_segment_page_of(segment, p);
mi_block_t* const block = (mi_block_t*)p;
if (mi_likely(tid == mi_atomic_load_relaxed(&segment->thread_id) && page->flags.full_aligned == 0)) { // the thread id matches and it is not a full page, nor has aligned blocks
if (mi_likely(tid == mi_atomic_load_relaxed((_Atomic(mi_threadid_t)*)&segment->thread_id) && page->flags.full_aligned == 0)) { // the thread id matches and it is not a full page, nor has aligned blocks
// local, and not full or aligned
if (mi_unlikely(mi_check_is_double_free(page,block))) return;
mi_check_padding(page, block);