Skip to content

Commit

Permalink
Disable asserts that cause false positive race warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
KIwabuchi committed Sep 22, 2023
1 parent 80e9976 commit e6178cb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/metall/kernel/manager_kernel_impl.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ void *manager_kernel<chnk_no, chnk_sz>::allocate(
return nullptr;
}
assert(offset >= 0);
#if !(defined(__has_feature) && __has_feature(thread_sanitizer))
assert(offset + nbytes <= m_segment_storage.size());
#endif

return priv_to_address(offset);
}

Expand All @@ -114,7 +117,9 @@ void *manager_kernel<chnk_no, chnk_sz>::allocate_aligned(
return nullptr;
}
assert(offset >= 0);
#if !(defined(__has_feature) && __has_feature(thread_sanitizer))
assert(offset + nbytes <= m_segment_storage.size());
#endif

auto *addr = priv_to_address(offset);
assert((uint64_t)addr % alignment == 0);
Expand Down

0 comments on commit e6178cb

Please sign in to comment.