[PATCH] D129448: [CodeGen][Asan] Emit lifetime intrinsic for bypassed label
Vitaly Buka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 10 20:25:32 PDT 2022
vitalybuka added inline comments.
================
Comment at: clang/lib/CodeGen/CodeGenFunction.h:935
SmallVector<const LabelDecl*, 4> Labels;
+ SmallVector<const llvm::CallInst *, 4> LifetimeStartMarkers;
LexicalScope *ParentScope;
----------------
LifetimeStartMarkers -> BypassedLifetimeStartMarkers
and below
if I read this correctly this is not any start marker
================
Comment at: clang/test/CodeGen/lifetime2.c:42
+ // O2: @llvm.lifetime.start.p0i8(i64 1
bar(&x, 1);
+ // O2: @llvm.lifetime.end.p0i8(i64 1
----------------
It assume this will break Msan Transforms/Instrumentation/MemorySanitizer.cpp:1298 as it assume variable is not initialized on start
```
void goto_bypass(void) {
{
char x;
l1:
bar(&x, 1);
if (x)
goto l1
}
goto l1;
}
```
================
Comment at: clang/test/CodeGen/lifetime2.c:78
break;
case 2:
bar(&x, 1);
----------------
Please check for lifetime markers, I assume case 2 will have a new one
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129448/new/
https://reviews.llvm.org/D129448
More information about the cfe-commits
mailing list