[llvm-bugs] [Bug 25568] New: analyzer reports use after free with fprintf is printing a variable address
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Nov 18 14:48:30 PST 2015
https://llvm.org/bugs/show_bug.cgi?id=25568
Bug ID: 25568
Summary: analyzer reports use after free with fprintf is
printing a variable address
Product: clang
Version: 3.7
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: cliffyapp at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
When provided the line:
fprintf(stderr, "%p realloc%6d %s [moved from %p]\n",
ptr, (int)siz, str, original_ptr);
clang reports a use of freed memory printing original_ptr. It is true the
memory pointed to by the address stored in original_ptr has been freed, but in
this case we aren't trying to access that memory but instead print the address
at which it was located. This appears to be a false positive, albeit one which
needs to be aware of how fprintf is using original_ptr.
--
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/20151118/556e2e65/attachment.html>
More information about the llvm-bugs
mailing list