[LLVMbugs] [Bug 11450] New: static analyzer crashes when given weird code as input

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Nov 28 16:40:28 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=11450

             Bug #: 11450
           Summary: static analyzer crashes when given weird code as input
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: mclow at qualcomm.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 7653
  --> http://llvm.org/bugs/attachment.cgi?id=7653
Source code demonstrating bug

if you run the following bit of code (that I actually found here at work-sigh)
through the static analyzer,
if petulantly prints out:
    Why load from a code text region?
and then crashes.

Yes, it's awful code, and wrong.
But the analyzer should't crash.

Invocation:

/Volumes/Bay2/LLVM/llvm-nodebug/Release+Asserts/bin/clang -cc1 -triple
x86_64-apple-macosx10.7.2 -analyze \
    -disable-free -main-file-name Junk.cpp -analyzer-store=region
-analyzer-opt-analyze-nested-blocks \
    -analyzer-eagerly-assume -analyzer-checker=core -analyzer-checker=deadcode
-analyzer-checker=security \
    -analyzer-checker=unix -analyzer-checker=osx -analyzer-output plist -w
-pic-level 1 -mdisable-fp-elim \
    -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version
123.2.1 \
    -resource-dir
/Volumes/Bay2/LLVM/llvm-nodebug/Release+Asserts/bin/../lib/clang/3.1 -D NDEBUG
\
    -fmodule-cache-path
/var/folders/80/c3p8_rj97lq0bfz3srw9_klr0000gn/T/clang-module-cache \
    -fdeprecated-macro -ferror-limit 19 -fmessage-length 0 -stack-protector 1
-fblocks -fobjc-runtime-has-arc \
    -fobjc-runtime-has-weak -fobjc-dispatch-method=mixed -fcxx-exceptions
-fexceptions \
    -fdiagnostics-show-option -x c++ sa-crash-11-28.cpp

-- 
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