[llvm-bugs] [Bug 27453] New: [ASan] Implement use-after-scope check.

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 21 13:51:01 PDT 2016


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: unassignedbugs at nondot.org
          Reporter: vitalybuka at google.com
                CC: llvm-bugs at lists.llvm.org
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160421/a0034059/attachment-0001.html>


More information about the llvm-bugs mailing list