================
@@ -1789,8 +1789,10 @@ llvm::Value *CodeGenFunction::EmitCXXNewExpr(const
CXXNewExpr *E) {
cleanupDominator = Builder.CreateUnreachable();
}
- assert((allocSize == allocSizeWithoutCookie) ==
- CalculateCookiePadding(*this, E).isZero());
+ // Without a cookie the two sizes must match. With a cookie they usually
+ // differ, but on overflow both can be all-ones, so don't assert the
converse.
----------------
henrimarconni wrote:
Good idea, done, keeping the original iff. with an escape hatch just for the
edge case where allocSize == all ones value.
https://github.com/llvm/llvm-project/pull/232570
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits