Skip to content

Commit 0153feb

Browse files
committed
launder
1 parent e77c6fa commit 0153feb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libc/src/__support/GPU/allocator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,8 @@ void *reallocate(void *ptr, uint64_t size) {
560560
return nullptr;
561561

562562
// The original slab pointer is the 2MiB boundary using the given pointer.
563-
Slab *slab = reinterpret_cast<Slab *>(
564-
(reinterpret_cast<uintptr_t>(ptr) & ~SLAB_ALIGNMENT));
563+
Slab *slab = cpp::launder(reinterpret_cast<Slab *>(
564+
(reinterpret_cast<uintptr_t>(ptr) & ~SLAB_ALIGNMENT)));
565565
if (slab->get_chunk_size() >= size)
566566
return ptr;
567567

0 commit comments

Comments
 (0)