Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

clang++ scan-build (2.75) crashes when analyzing this file #17212

Closed Quuxplusone closed 6 years ago

Quuxplusone commented 11 years ago
Bugzilla Link PR17212
Status RESOLVED INVALID
Importance P normal
Reported by Jeremy Friesner (jaf@meyersound.com)
Reported on 2013-09-12 13:09:26 -0700
Last modified on 2018-02-26 07:01:32 -0800
Version unspecified
Hardware Macintosh MacOS X
CC alexfh@google.com, jrose@belkadan.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments clang_crash_83XT6s.ii.zip (205028 bytes, application/zip)
Blocks
Blocked by
See also
The scan-build process (from the checker-275 binary distribution) fails when
analyzing some of my files.  STDERR Output is below; the corresponding .ii file
is attached.

Assertion failed: (!V.getAs<Loc>() || Loc::isLocType(Result->getType()) ||
Result->getType()->isMemberPointerType()), function
createTemporaryRegionIfNeeded, file /Volumes/Data/Users/kremenek/checker-
build/checker-build/checker-275-
src/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp, line 185.
0  clang++           0x0000000100accd3f PrintStackTraceSignalHandler(void*) + 47
1  clang++           0x0000000100acd314 SignalHandler(int) + 404
2  libsystem_c.dylib 0x00007fff8bd7f94a _sigtramp + 26
3  libsystem_c.dylib 0x0000000103c73db8 _sigtramp + 2012169352
4  clang++           0x0000000100accf56 abort + 22
5  clang++           0x0000000100accf31 __assert_rtn + 81
6  clang++           0x00000001017b23c8
clang::ento::ExprEngine::createTemporaryRegionIfNeeded(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState
const>, clang::LocationContext const*, clang::Expr const*, clang::Expr const*)
+ 264
7  clang++           0x00000001017bb6e6
clang::ento::ExprEngine::Visit(clang::Stmt const*, clang::ento::ExplodedNode*,
clang::ento::ExplodedNodeSet&) + 28630
8  clang++           0x00000001017b3a71
clang::ento::ExprEngine::processCFGElement(clang::CFGElement,
clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*) +
4273
9  clang++           0x00000001017ab3d6
clang::ento::CoreEngine::dispatchWorkItem(clang::ento::ExplodedNode*,
clang::ProgramPoint, clang::ento::WorkListUnit const&) + 1606
10 clang++           0x00000001016afee3 (anonymous
namespace)::AnalysisConsumer::ActionExprEngine(clang::Decl*, bool,
clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*,
llvm::DenseMapInfo<clang::Decl const*> >*) + 1651
11 clang++           0x00000001016af158 (anonymous
namespace)::AnalysisConsumer::HandleCode(clang::Decl*, unsigned int,
clang::ento::ExprEngine::InliningModes, llvm::DenseSet<clang::Decl const*,
llvm::DenseMapInfo<clang::Decl const*> >*) + 2232
12 clang++           0x00000001016a7d9e (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) + 4334
13 clang++           0x0000000100f7ca12 clang::ParseAST(clang::Sema&, bool,
bool) + 402
14 clang++           0x0000000100ef1eab clang::FrontendAction::Execute() + 123
15 clang++           0x0000000100ecbd41
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1025
16 clang++           0x0000000100008995 main + 28421
17 clang++           0x0000000100001a34 start + 52
Stack dump:
0.  Program arguments: /Users/jaf/checker-275/bin/clang++ -cc1 -triple x86_64-
apple-macosx10.7.0 -analyze -disable-free -main-file-name DmitriConfig.cpp -
analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-eagerly-
assume -analyzer-checker=core -analyzer-checker=unix -analyzer-checker=osx -
analyzer-checker=deadcode -analyzer-checker=cplusplus -analyzer-
checker=security.insecureAPI.UncheckedReturn -analyzer-
checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -
analyzer-checker=security.insecureAPI.mktemp -analyzer-
checker=security.insecureAPI.mkstemp -analyzer-
checker=security.insecureAPI.vfork -analyzer-output plist -w -mrelocation-model
pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu
core2 -resource-dir /Users/jaf/checker-275/bin/../lib/clang/3.4 -D
QT_EDITION=QT_EDITION_DESKTOP -D AVOID_PRECOMPILED_HEADERS -D
MUSCLE_USE_PTHREADS -D LCS_RELEASE_IS_FULLY_QUALIFIED= -D
SVN_VERSION_STRING="12354" -D UNIFIED_DAEMON -D FAKE_DSP=1 -D VIRTUAL_DMITRI -D
USE_NORMALIZER_FACTORY -D QT_NO_CAST_ASCII -D MUSCLE_ENABLE_MEMORY_TRACKING -D
MUSCLE_ENABLE_ZLIB_ENCODING -D MIXERD_INCLUDE_CCD -D
MUSCLE_INCLUDE_SOURCE_LOCATION_IN_LOGTIME -D MUSCLE_USE_CPLUSPLUS11 -D
QT_NO_DEBUG -D QT_GUI_LIB -D QT_CORE_LIB -D QT_HAVE_MMX -D QT_HAVE_3DNOW -D
QT_HAVE_SSE -D QT_HAVE_MMXEXT -D QT_HAVE_SSE2 -D QT_HAVE_SSE3 -D QT_HAVE_SSSE3 -
D QT_HAVE_SSE4_1 -D QT_HAVE_SSE4_2 -D _LARGEFILE64_SOURCE -D _LARGEFILE_SOURCE -
D QT_SHARED -I ../../../../../qt-everywhere-enterprise-src-
4.8.5/mkspecs/unsupported/macx-clang -I . -I ../../../../../qt-everywhere-
enterprise-src-4.8.5/lib/QtCore.framework/Versions/4/Headers -I
../../../../../qt-everywhere-enterprise-src-4.8.5/include/QtCore -I
../../../../../qt-everywhere-enterprise-src-
4.8.5/lib/QtGui.framework/Versions/4/Headers -I ../../../../../qt-everywhere-
enterprise-src-4.8.5/include/QtGui -I ../../../../../qt-everywhere-enterprise-
src-4.8.5/include -I ../../../../3rdparty/libsndfile/src -I ../../../.. -I
../../../../libs/libmslicommon/include -I ../../../../servers/servers/include -
I ../../../../apps -I ../../../../apps/CueStation -I ../../../../libs/muscle -I
../../../../libs/muscle/zlib/zlib -I ../../../../apps/vdmitri/include -I
../../../../libs/libmslisupport/include -I ../../../../libs/libmslidsp/include -
I ../../../../libs/avbapi/include -I ../../../../libs/libmslisupport/include -I
../../../../libs/libjdkmidi/include -I ../../../../libs/libsmpte/include -I
../../../../libs/libcasl/include -I ../../../../libs/musclex/include -I
../../../../tools/dmitriproxy/include -I ../../../../3rdparty/libsndfile/src -I
../../../../3rdparty/python/Include -I ../../../../3rdparty/python -I moc-
release -F/Users/jaf/qt/lib -stdlib=libc++ -std=c++11 -fdeprecated-macro -
fdebug-compilation-dir /Users/jaf/software/apps/vdmitri/build/release -ferror-
limit 19 -fmessage-length 0 -stack-protector 1 -mstackrealign -fblocks -fobjc-
runtime=macosx-10.7.0 -fobjc-dispatch-method=mixed -fobjc-default-synthesize-
properties -fencode-extended-block-signature -fcxx-exceptions -fexceptions -
fdiagnostics-show-option -backend-option -vectorize-loops -analyzer-output=html
-o /var/folders/xb/6c5bw1tx4qx8qkhd8rk98yc00000gn/T/scan-build-2013-09-12-3 -x
c++ ../../../../libs/libmslicommon/src/db/config/DmitriConfig.cpp
1.  <eof> parser at end of file
2.  ../../../../libs/libmslicommon/src/db/config/DmitriConfig.cpp:743:35: Error
evaluating statement
3.  ../../../../libs/libmslicommon/src/db/config/DmitriConfig.cpp:743:35: Error
evaluating statement
Quuxplusone commented 11 years ago

Attached clang_crash_83XT6s.ii.zip (205028 bytes, application/zip): preprocessed code for DmitriConfig.cpp

Quuxplusone commented 11 years ago

I can't reproduce this with a trunk build. There were a couple fixes around createTemporaryRegionIfNeeded over the summer (it's been a while since checker-275!), so can you try with a trunk build of Clang, or wait for the next checker build?

Quuxplusone commented 6 years ago

The report is hardly relevant now. If you still get the analyzer to crash, please open another bug with an isolated test case.