[LLVMbugs] [Bug 16812] New: static analyzer should warn on use of va_arg() macro before call to va_start() macro or after call to va_end() macro
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Aug 6 18:23:56 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16812
Bug ID: 16812
Summary: static analyzer should warn on use of va_arg() macro
before call to va_start() macro or after call to
va_end() macro
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: oohrah at mac.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
It would be nice if the static analyzer gave a warning about use of va_arg()
before the call to va_start() and one about use of va_arg() after the call to
va_end() with this code:
static void func(const char *format, ...)
{
va_list arguments;
int x = va_arg(arguments, int);
va_start (arguments, format);
vprintf(format, arguments);
va_end (arguments);
int y = va_arg(arguments, int);
printf("x + y = %d\n", (x + y));
}
--
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/20130807/4be6a737/attachment.html>
More information about the llvm-bugs
mailing list