================
@@ -33,6 +33,7 @@ Pointer::Pointer(Block *Pointee, uint64_t BaseAndOffset)
Pointer::Pointer(Block *Pointee, unsigned Base, uint64_t Offset)
: Offset(Offset), StorageKind(Storage::Block) {
assert((Base == RootPtrMark || Base % alignof(void *) == 0) && "wrong base");
+ assert(Base >= Pointee->getDescriptor()->getMetadataSize());
----------------
shafik wrote:
You dereference `Pointee` unconditionally here but below we have a `nullptr`
check on `Pointee`. One of these is an error.
https://github.com/llvm/llvm-project/pull/168053
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits