[LLVMbugs] [Bug 16782] New: Possible false NULL dereference warning in doubly-linked list
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Aug 2 17:28:02 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16782
Bug ID: 16782
Summary: Possible false NULL dereference warning in
doubly-linked list
Product: clang
Version: trunk
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: bugzilla at jwwalker.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 10977
--> http://llvm.org/bugs/attachment.cgi?id=10977&action=edit
C++ source and header
Overview:
The static analyzer says that in traversing a doubly linked list, a NULL
pointer can be dereferenced, but I can't see how that can happen.
Steps to reproduce:
Analyze the attached source, like:
clang -DDEBUG=1 --analyze micropather.cpp
Actual results:
micropather.h:206:45: warning: Access to field 'next' results in a dereference
of a null pointer (loaded from variable 'it'
Expected results:
No warning.
Build date:
clang version 3.4 (trunk 187678)
Target: x86_64-apple-darwin11.4.2
Thread model: posix
Additional information:
The code is from <http://sourceforge.net/projects/micropather/>. I don't claim
to be intimately familiar with it. But it appears to me that the next and prev
pointers only become NULL when a node is removed from the doubly linked list,
so traversing the list should not encounter a NULL.
--
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/20130803/fcb9bdac/attachment.html>
More information about the llvm-bugs
mailing list