[LLVMbugs] [Bug 6036] New: clang analyzer crash with signal 8

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Jan 13 15:59:04 PST 2010


           Summary: clang analyzer crash with signal 8
           Product: new-bugs
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: regehr at cs.utah.edu
                CC: llvmbugs at cs.uiuc.edu

Valgrind says it's a divide by zero.

regehr at john-home:~/volatile/bugs/tmp258$ clang --analyze small.c
small.c:6:20: warning: declaration of 'struct work' will not be visible outside
      of this function
u132monitk (struct work *work)
small.c:8:68: warning: expression result unused [-Wunused-value]
  ((struct usb_hcd *) (unsigned long (*)[0]) ((char *) work - 1))->state;
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^~~~~
0  clang 0x090ee918
Stack dump:
0.      Program arguments: /home/regehr/z/tmp/llvm-gcc-r93238-install/bin/clang
-cc1 -triple i386-pc-linux-gnu -analyze -disable-free -main-file-name small.c
-analyzer-store=region -analyzer-opt-analyze-nested-blocks -warn-dead-stores
-warn-security-syntactic -checker-cfref -analyzer-eagerly-assume
-warn-objc-methodsigs -warn-objc-unused-ivars -analyzer-output plist
-mrelocation-model static -mdisable-fp-elim -target-cpu pentium4 -resource-dir
/home/regehr/z/tmp/llvm-gcc-r93238-install/lib/clang/1.1 -fmessage-length 80
-fgnu-runtime -fdiagnostics-show-option -fcolor-diagnostics -o small.plist -x c
1.      <eof> parser at end of file
2.      small.c:8:3: Error evaluating statement
3.      small.c:8:3: Error evaluating statement
4.      small.c:8:4: Error evaluating statement
5.      small.c:8:23: Error evaluating statement
clang: error: analyzer command failed due to signal 8 (use -v to see
regehr at john-home:~/volatile/bugs/tmp258$ cat small.c
struct usb_hcd
  int state;
u132monitk (struct work *work)
  ((struct usb_hcd *) (unsigned long (*)[0]) ((char *) work - 1))->state;
regehr at john-home:~/volatile/bugs/tmp258$ clang -v
clang version 1.1 (trunk 93238)
Target: i386-pc-linux-gnu
Thread model: posix

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