[LLVMbugs] [Bug 16307] New: Static analyzer crashes when processing K&R function calls

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jun 12 07:06:04 PDT 2013


            Bug ID: 16307
           Summary: Static analyzer crashes when processing K&R function
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: labath at google.com
                CC: klimek at google.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 10665
  --> http://llvm.org/bugs/attachment.cgi?id=10665&action=edit
Error message, backtrace

The static analyzer crashes when run on the following file:
void f(a) int a; { }
void g() { f(); }

$ ~/llvm/build/bin/clang --analyze /tmp/a.c 
clang-3.4: ../tools/clang/include/clang/AST/Expr.h:2196: const clang::Expr
*clang::CallExpr::getArg(unsigned int) const: Assertion `Arg < NumArgs && "Arg
access out of range!"' failed.

I include the backtrace in the attachment. The bug does not happen with

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/20130612/2322a479/attachment.html>

More information about the llvm-bugs mailing list