[clang] [compiler-rt] [UBSan] Fix incorrect alignment reported when global new returns an o… (PR #152532)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 8 09:02:23 PDT 2025
================
@@ -1798,7 +1798,7 @@ llvm::Value *CodeGenFunction::EmitCXXNewExpr(const CXXNewExpr *E) {
SkippedChecks.set(SanitizerKind::Null, nullCheck);
EmitTypeCheck(CodeGenFunction::TCK_ConstructorCall,
E->getAllocatedTypeSourceInfo()->getTypeLoc().getBeginLoc(),
- result, allocType, result.getAlignment(), SkippedChecks,
+ result, allocType, allocAlign, SkippedChecks,
----------------
gbMattN wrote:
To check my understanding, you mean I should do a separate pr with a test that fails due to this issue, and then fix it in this pr?
https://github.com/llvm/llvm-project/pull/152532
More information about the llvm-commits
mailing list