Open Quuxplusone opened 3 years ago
Because there is no any core file.
clang-11 exewcutable exits with ptonting call trace.
Here is the end of the build log of libkcap with execution of the "scan" target:
+ /usr/bin/make -O -j1 V=1 VERBOSE=1 scan
Makefile:2024: warning: overriding recipe for target 'lib/doc/bin/docproc'
Makefile:992: warning: ignoring old recipe for target 'lib/doc/bin/docproc'
CCSA apps/app-internal.plist
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /usr/bin/clang --analyze -DPACKAGE_NAME="libkcapi" -
DPACKAGE_TARNAME="libkcapi" -DPACKAGE_VERSION="1.2.1" -
DPACKAGE_STRING="libkcapi 1.2.1" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -
DKCAPI_MAJVERSION=1 -DKCAPI_MINVERSION=2 -DKCAPI_PATCHLEVEL=1 -
DPACKAGE="libkcapi" -DVERSION="1.2.1" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -
DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -
DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -
DHAVE_DLFCN_H=1 -DLT_OBJDIR=".libs/" -DHAVE_GETRANDOM=1 -DHAVE_SECURE_GETENV=1 -
DCHECK_PREFIX="" -DCHECK_SUFFIX="hmac" -DCHECK_DIR="/usr/lib64" -DHAVE_FSEEKO=1
-I. -I./lib/ apps/app-internal.c -o apps/app-internal.plist
1. <eof> parser at end of file
2. While analyzing stack:
#0 Calling check_filetype
3. apps/app-internal.c:253:12: Error evaluating statement
4. apps/app-internal.c:253:12: Error evaluating statement
#0 0x00007f002a729f73 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/lib64/libLLVM-11.so+0xad0f73)
#1 0x00007f002a7281a4 llvm::sys::RunSignalHandlers() (/lib64/libLLVM-11.so+0xacf1a4)
#2 0x00007f002a65d028 (/lib64/libLLVM-11.so+0xa04028)
#3 0x00007f002988d310 __restore_rt (/lib64/libc.so.6+0x3d310)
#4 0x00007f0030fc543f clang::ento::RangeSet::IntersectInRange(clang::ento::BasicValueFactory&, llvm::ImmutableSet<clang::ento::Range, clang::ento::RangeTrait>::Factory&, llvm::APSInt const&, llvm::APSInt const&, llvm::ImmutableSet<clang::ento::Range, clang::ento::RangeTrait>&, llvm::ImutAVLValueIterator<llvm::ImmutableSet<clang::ento::Range, clang::ento::RangeTrait> >&, llvm::ImutAVLValueIterator<llvm::ImmutableSet<clang::ento::Range, clang::ento::RangeTrait> >&) const (/lib64/libclang-cpp.so.11.1+0x205343f)
#5 0x00007f0030fc5b70 clang::ento::RangeSet::Intersect(clang::ento::BasicValueFactory&, llvm::ImmutableSet<clang::ento::Range, clang::ento::RangeTrait>::Factory&, llvm::APSInt, llvm::APSInt) const (/lib64/libclang-cpp.so.11.1+0x2053b70)
#6 0x00007f0031058214 (/lib64/libclang-cpp.so.11.1+0x20e6214)
#7 0x00007f0030fcb5b1 clang::ento::RangedConstraintManager::assumeSymRel(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SymExpr const*, clang::BinaryOperatorKind, llvm::APSInt const&) (/lib64/libclang-cpp.so.11.1+0x20595b1)
#8 0x00007f00310528a0 clang::ento::RangedConstraintManager::assumeSym(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::SymExpr const*, bool) (/lib64/libclang-cpp.so.11.1+0x20e08a0)
#9 0x00007f0030fdaa46 clang::ento::SimpleConstraintManager::assumeAux(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>, clang::ento::NonLoc, bool) (/lib64/libclang-cpp.so.11.1+0x2068a46)
#10 0x00007f0030fdaaf9
clang::ento::SimpleConstraintManager::assume(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState
const>, clang::ento::NonLoc, bool) (/lib64/libclang-cpp.so.11.1+0x2068af9)
#11 0x00007f003101089a
clang::ento::SimpleConstraintManager::assume(llvm::IntrusiveRefCntPtr<clang::ento::ProgramState
const>, clang::ento::DefinedSVal, bool) (/lib64/libclang-cpp.so.11.1+0x209e89a)
#12 0x00007f0030f98007 (/lib64/libclang-cpp.so.11.1+0x2026007)
#13 0x00007f003103eec5 (/lib64/libclang-cpp.so.11.1+0x20ccec5)
#14 0x00007f0030f96282 (/lib64/libclang-cpp.so.11.1+0x2024282)
#15 0x00007f0030f966d8
clang::ento::CheckerManager::runCheckersForCallEvent(bool,
clang::ento::ExplodedNodeSet&, clang::ento::ExplodedNodeSet const&,
clang::ento::CallEvent const&, clang::ento::ExprEngine&, bool) (/lib64/libclang-
cpp.so.11.1+0x20246d8)
#16 0x00007f0031064779
clang::ento::ExprEngine::evalCall(clang::ento::ExplodedNodeSet&,
clang::ento::ExplodedNode*, clang::ento::CallEvent const&) (/lib64/libclang-
cpp.so.11.1+0x20f2779)
#17 0x00007f0031065571 clang::ento::ExprEngine::VisitCallExpr(clang::CallExpr
const*, clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&)
(/lib64/libclang-cpp.so.11.1+0x20f3571)
#18 0x00007f0031069e47 clang::ento::ExprEngine::Visit(clang::Stmt const*,
clang::ento::ExplodedNode*, clang::ento::ExplodedNodeSet&) (/lib64/libclang-
cpp.so.11.1+0x20f7e47)
#19 0x00007f0031074b04 clang::ento::ExprEngine::ProcessStmt(clang::Stmt const*,
clang::ento::ExplodedNode*) (/lib64/libclang-cpp.so.11.1+0x2102b04)
#20 0x00007f0031074e8a
clang::ento::ExprEngine::processCFGElement(clang::CFGElement,
clang::ento::ExplodedNode*, unsigned int, clang::ento::NodeBuilderContext*)
(/lib64/libclang-cpp.so.11.1+0x2102e8a)
#21 0x00007f0031077db6 clang::ento::CoreEngine::HandlePostStmt(clang::CFGBlock
const*, unsigned int, clang::ento::ExplodedNode*) (/lib64/libclang-
cpp.so.11.1+0x2105db6)
#22 0x00007f003107809f
clang::ento::CoreEngine::ExecuteWorkList(clang::LocationContext const*,
unsigned int, llvm::IntrusiveRefCntPtr<clang::ento::ProgramState const>)
(/lib64/libclang-cpp.so.11.1+0x210609f)
#23 0x00007f003108d347 (/lib64/libclang-cpp.so.11.1+0x211b347)
#24 0x00007f0031090c3c (/lib64/libclang-cpp.so.11.1+0x211ec3c)
#25 0x00007f0030de56fd clang::ParseAST(clang::Sema&, bool, bool)
(/lib64/libclang-cpp.so.11.1+0x1e736fd)
#26 0x00007f0030a06039 clang::FrontendAction::Execute() (/lib64/libclang-
cpp.so.11.1+0x1a94039)
#27 0x00007f0030e31fbb
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/lib64/libclang-
cpp.so.11.1+0x1ebffbb)
#28 0x00007f00310efade
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/lib64/libclang-
cpp.so.11.1+0x217dade)
#29 0x000056052f650b63 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/usr/bin/clang+0x1ab63)
#30 0x000056052f656c1d (/usr/bin/clang+0x20c1d)
#31 0x00007f002f7865d9 (/lib64/libclang-cpp.so.11.1+0x8145d9)
#32 0x00007f002a65d0f7
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>)
(/lib64/libLLVM-11.so+0xa040f7)
#33 0x00007f003001e176
clang::driver::CC1Command::Execute(llvm::ArrayRef<llvm::Optional<llvm::StringRef>
>, std::__cxx11::basic_string<char, std::char_traits<char>,
std::allocator<char> >*, bool*) const (/lib64/libclang-cpp.so.11.1+0x10ac176)
#34 0x00007f003015dd1b
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&,
clang::driver::Command const*&) const (/lib64/libclang-cpp.so.11.1+0x11ebd1b)
#35 0x00007f003015e0c7
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&) const
(/lib64/libclang-cpp.so.11.1+0x11ec0c7)
#36 0x00007f0030193e8c
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&,
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*> >&)
(/lib64/libclang-cpp.so.11.1+0x1221e8c)
#37 0x000056052f6492ef main (/usr/bin/clang+0x132ef)
#38 0x00007f0029877b75 __libc_start_main (/lib64/libc.so.6+0x27b75)
#39 0x000056052f649eee _start (/usr/bin/clang+0x13eee)
clang-11: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 11.1.0 (G2V 11.1.0-7.fc35)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-11: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-11: note: diagnostic msg: /tmp/app-internal-b35d98.c
clang-11: note: diagnostic msg: /tmp/app-internal-b35d98.sh
clang-11: note: diagnostic msg:
********************
make: *** [Makefile:2010: apps/app-internal.plist] Error 254
Attached app-internal-b35d98.sh
(5096 bytes, text/x-sh): /tmp/app-internal-b35d98.c
Attached app-internal-b35d98.c
(794440 bytes, text/plain): /tmp/app-internal-b35d98.sh
app-internal-b35d98.sh
(5096 bytes, text/x-sh)app-internal-b35d98.c
(794440 bytes, text/plain)All details are in https://github.com/smuellerDD/libkcapi/issues/108
I don't see anuy generated core dumps so I'm not sure how can I delivel back trace details with source code lines numbers.