We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e77c6fa commit 0153febCopy full SHA for 0153feb
libc/src/__support/GPU/allocator.cpp
@@ -560,8 +560,8 @@ void *reallocate(void *ptr, uint64_t size) {
560
return nullptr;
561
562
// 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));
+ Slab *slab = cpp::launder(reinterpret_cast<Slab *>(
+ (reinterpret_cast<uintptr_t>(ptr) & ~SLAB_ALIGNMENT)));
565
if (slab->get_chunk_size() >= size)
566
return ptr;
567
0 commit comments