https://llvm.org/bugs/show_bug.cgi?id=27453
Bug ID: 27453
Summary: [ASan] Implement use-after-scope check.
Product: new-bugs
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
Some local variables can have lifetime smaller then function execution.
E.g.:
int main() {
int *p = nullptr;
{
int x = 0;
p = &x;
}
return *p;
}
Usually such cases does not crash, as stack frame still has region allocated
for such variables. Still content of such variables after lifetime end is
undefined.
Asan is can detect such cases by poisoning/poisoning memory according lifetime
markers.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs