[LLVMbugs] [Bug 12186] New: AsmStmt output parameters are not checked for nullptr derefs
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Mar 5 01:14:24 PST 2012
http://llvm.org/bugs/show_bug.cgi?id=12186
Bug #: 12186
Summary: AsmStmt output parameters are not checked for nullptr
derefs
Product: clang
Version: trunk
Platform: PC
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
AssignedTo: kremenek at apple.com
ReportedBy: Erik.Verbruggen at Me.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Autotest nullptr.cpp contains the following function:
void zoo2() {
int **a = 0;
int **b = 0;
asm ("nop"
:"=a"(*a)
:"0"(*b) // expected-warning{{Dereference of null pointer}}
);
}
First "a" is initialised to null, and in the asm statmement "a" is dereferenced
on the output parameter position. No warning is produced, while dereferencing
the input parameter "b" does give a warning.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list