Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Suppress compiler warning on potential buffer overflow #935

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix
  • Loading branch information
doctorlai-msrc committed Aug 31, 2024
commit 74e5af47662d2e47a1658205e3d1609d4d7907a3
2 changes: 1 addition & 1 deletion src/heap.c
Original file line number Diff line number Diff line change
@@ -59,7 +59,7 @@ static bool mi_heap_page_is_valid(mi_heap_t* heap, mi_page_queue_t* pq, mi_page_
MI_UNUSED(pq);
mi_assert_internal(mi_page_heap(page) == heap);
mi_segment_t* segment = _mi_page_segment(page);
uintptr_t thread_id = __atomic_load_n(&segment->thread_id, __ATOMIC_RELAXED);
mi_threadid_t thread_id = atomic_load(&segment->thread_id);
mi_assert_internal(thread_id == heap->thread_id);
mi_assert_expensive(_mi_page_is_valid(page));
return true;