<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - clangsa segfault"
href="https://bugs.llvm.org/show_bug.cgi?id=47998">47998</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clangsa segfault
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>11.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Static Analyzer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>dcoughlin@apple.com
</td>
</tr>
<tr>
<th>Reporter</th>
<td>jimis@gmx.net
</td>
</tr>
<tr>
<th>CC</th>
<td>dcoughlin@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Codechecker was failing to analyze several c++ files. Running `CodeChecker
analyze` it with `--verbose debug` flag revealed the following huge command
line, which I run and got a segfault:
/usr/lib/llvm-11/bin/clang --analyze -Qunused-arguments -Xclang
-analyzer-opt-analyze-headers -Xclang -analyzer-output=plist-multi-file -o
/home/codechecker/codechecker_results/qobject_analysis-20201028/qobject.cpp_clangsa_e4cb5931af0302a93f80fa224029794b.plist
-Xclang -analyzer-config -Xclang expand-macros=true -Xclang
-analyzer-checker=apiModeling.StdCLibraryFunctions -Xclang
-analyzer-checker=apiModeling.TrustNonnull -Xclang
-analyzer-checker=apiModeling.google.GTest -Xclang
-analyzer-checker=apiModeling.llvm.CastValue -Xclang
-analyzer-checker=apiModeling.llvm.ReturnValue -Xclang
-analyzer-checker=core.CallAndMessage -Xclang
-analyzer-checker=core.CallAndMessageModeling -Xclang
-analyzer-checker=core.DivideZero -Xclang
-analyzer-checker=core.DynamicTypePropagation -Xclang
-analyzer-checker=core.NonNullParamChecker -Xclang
-analyzer-checker=core.NonnilStringConstants -Xclang
-analyzer-checker=core.NullDereference -Xclang
-analyzer-checker=core.StackAddrEscapeBase -Xclang
-analyzer-checker=core.StackAddressEscape -Xclang
-analyzer-checker=core.UndefinedBinaryOperatorResult -Xclang
-analyzer-checker=core.VLASize -Xclang
-analyzer-checker=core.builtin.BuiltinFunctions -Xclang
-analyzer-checker=core.builtin.NoReturnFunctions -Xclang
-analyzer-checker=core.uninitialized.ArraySubscript -Xclang
-analyzer-checker=core.uninitialized.Assign -Xclang
-analyzer-checker=core.uninitialized.Branch -Xclang
-analyzer-checker=core.uninitialized.CapturedBlockVariable -Xclang
-analyzer-checker=core.uninitialized.UndefReturn -Xclang
-analyzer-checker=cplusplus.InnerPointer -Xclang
-analyzer-checker=cplusplus.Move -Xclang -analyzer-checker=cplusplus.NewDelete
-Xclang -analyzer-checker=cplusplus.NewDeleteLeaks -Xclang
-analyzer-checker=cplusplus.PlacementNew -Xclang
-analyzer-checker=cplusplus.PureVirtualCall -Xclang
-analyzer-checker=cplusplus.SelfAssignment -Xclang
-analyzer-checker=cplusplus.SmartPtrModeling -Xclang
-analyzer-checker=cplusplus.VirtualCallModeling -Xclang
-analyzer-checker=deadcode.DeadStores -Xclang
-analyzer-checker=nullability.NullPassedToNonnull -Xclang
-analyzer-checker=nullability.NullReturnedFromNonnull -Xclang
-analyzer-checker=optin.cplusplus.UninitializedObject -Xclang
-analyzer-checker=optin.cplusplus.VirtualCall -Xclang
-analyzer-checker=optin.portability.UnixAPI -Xclang
-analyzer-checker=security.FloatLoopCounter -Xclang
-analyzer-checker=security.insecureAPI.UncheckedReturn -Xclang
-analyzer-checker=security.insecureAPI.getpw -Xclang
-analyzer-checker=security.insecureAPI.gets -Xclang
-analyzer-checker=security.insecureAPI.mkstemp -Xclang
-analyzer-checker=security.insecureAPI.mktemp -Xclang
-analyzer-checker=security.insecureAPI.rand -Xclang
-analyzer-checker=security.insecureAPI.vfork -Xclang -analyzer-checker=unix.API
-Xclang -analyzer-checker=unix.DynamicMemoryModeling -Xclang
-analyzer-checker=unix.Malloc -Xclang -analyzer-checker=unix.MallocSizeof
-Xclang -analyzer-checker=unix.MismatchedDeallocator -Xclang
-analyzer-checker=unix.Vfork -Xclang -analyzer-checker=unix.cstring.BadSizeArg
-Xclang -analyzer-checker=unix.cstring.CStringModeling -Xclang
-analyzer-checker=unix.cstring.NullArg -Xclang
-analyzer-checker=valist.CopyToSelf -Xclang
-analyzer-checker=valist.Uninitialized -Xclang
-analyzer-checker=valist.Unterminated -Xclang
-analyzer-checker=valist.ValistBase -Xclang -analyzer-config -Xclang
aggressive-binary-operation-simplification=true -Xclang -analyzer-config
-Xclang experimental-enable-naive-ctu-analysis=true -Xclang -analyzer-config
-Xclang
ctu-dir=/home/codechecker/codechecker_results/qobject_analysis-20201028/ctu-dir/x86_64
-Xclang -analyzer-config -Xclang display-ctu-progress=true -Xclang
-analyzer-config -Xclang
ctu-invocation-list=/home/codechecker/codechecker_results/qobject_analysis-20201028/ctu-dir/x86_64/invocation-list.yml
-x c++ -DELF_INTERPRETER="/lib64/ld-linux-x86-64.so.2" -DQT_ASCII_CAST_WARNINGS
-DQT_BUILDING_QT -DQT_BUILD_CORE_LIB -DQT_CORE_LIB -DQT_CORE_QOBJECT_LIB
-DQT_DEPRECATED_WARNINGS -DQT_DEPRECATED_WARNINGS_SINCE=0x060000
-DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_MOC_COMPAT -DQT_NO_CAST_TO_ASCII
-DQT_NO_FOREACH -DQT_NO_USING_NAMESPACE -DQT_USE_QSTRINGBUILDER
-D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE
-I/home/codechecker/qt/qtbase/build/src/corelib/Core_autogen/include
-I/home/codechecker/qt/qtbase/build/include
-I/home/codechecker/qt/qtbase/build/include/QtCore
-I/home/codechecker/qt/qtbase/src/corelib
-I/home/codechecker/qt/qtbase/build/src/corelib
-I/home/codechecker/qt/qtbase/build/src/corelib/global
-I/home/codechecker/qt/qtbase/src/3rdparty/tinycbor/src
-I/home/codechecker/qt/qtbase/build/include/QtCore/6.0.0
-I/home/codechecker/qt/qtbase/build/include/QtCore/6.0.0/QtCore
-I/home/codechecker/qt/qtbase/src/3rdparty
-I/home/codechecker/qt/qtbase/src/3rdparty/double-conversion/include
-I/home/codechecker/qt/qtbase/src/3rdparty/forkfd
-I/home/codechecker/qt/qtbase/build/src/corelib/.rcc
-I/home/codechecker/qt/qtbase/mkspecs/linux-clang -I/usr/include/glib-2.0
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include
-I/home/codechecker/qt/qtbase/build/src/corelib/kernel -stdlib=libc++ -g -fPIC
-fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -fPIC -std=c++17
-MD /home/codechecker/qt/qtbase/src/corelib/kernel/qobject.cpp
CTU loaded AST file:
/home/codechecker/qt/qtbase/src/corelib/text/qbytearray.cpp
CTU loaded AST file: /home/codechecker/qt/qtbase/src/corelib/text/qstring.cpp
CTU loaded AST file: /home/codechecker/qt/qtbase/src/corelib/kernel/qmath.cpp
CTU loaded AST file:
/home/codechecker/qt/qtbase/src/corelib/text/qstringconverter.cpp
Segmentation fault (core dumped)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>