Bug 464372 - clazy-standalone crashes with assertion
Summary: clazy-standalone crashes with assertion
Status: REPORTED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-16 11:51 UTC by christian.kandeler
Modified: 2023-01-16 12:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Example project (2.67 KB, application/zip)
2023-01-16 11:51 UTC, christian.kandeler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description christian.kandeler 2023-01-16 11:51:12 UTC
Created attachment 155346 [details]
Example project

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

STEPS TO REPRODUCE
1.  Run clazy-standalone on mainwnd.cpp from attached project, e.g.:
/usr/bin/clazy-standalone  mainwnd.cpp --  -x c++ -std=gnu++17 -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I./tmp

OBSERVED RESULT
clazy-standalone: /usr/include/llvm/Support/Casting.h:104: static bool llvm::isa_impl_cl<To, const From*>::doit(const From*) [with To = clang::CXXThisExpr; From = clang::Stmt]: Assertion `Val && "isa<> used on a null pointer"' failed.
Aborted (core dumped)

stack trace:
#0  0x00007f17c68a164c in ?? () from /usr/lib/libc.so.6
(gdb) bt
#0  0x00007f17c68a164c in ?? () from /usr/lib/libc.so.6
#1  0x00007f17c6851958 in raise () from /usr/lib/libc.so.6
#2  0x00007f17c683b53d in abort () from /usr/lib/libc.so.6
#3  0x00007f17c683b45c in ?? () from /usr/lib/libc.so.6
#4  0x00007f17c684a486 in __assert_fail () from /usr/lib/libc.so.6
#5  0x00007f17d114653a in ?? () from /usr/lib/ClazyPlugin.so
#6  0x00007f17d1152dea in InstallEventFilter::VisitStmt(clang::Stmt*) () from /usr/lib/ClazyPlugin.so
#7  0x00007f17d1165ada in ClazyASTConsumer::VisitStmt(clang::Stmt*) () from /usr/lib/ClazyPlugin.so
#8  0x00007f17d1173eed in ?? () from /usr/lib/ClazyPlugin.so
#9  0x00007f17d116cdc2 in ?? () from /usr/lib/ClazyPlugin.so
#10 0x00007f17d1170bc7 in ?? () from /usr/lib/ClazyPlugin.so
#11 0x00007f17d11675ab in ?? () from /usr/lib/ClazyPlugin.so
#12 0x00007f17d116cc80 in ?? () from /usr/lib/ClazyPlugin.so
#13 0x00007f17d116cac9 in ?? () from /usr/lib/ClazyPlugin.so
#14 0x00007f17d116cbc9 in ClazyASTConsumer::HandleTranslationUnit(clang::ASTContext&) () from /usr/lib/ClazyPlugin.so
#15 0x00007f17cfdc04d0 in clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) () from /usr/lib/libclang-cpp.so.14
#16 0x00007f17ce7d9f9b in clang::ParseAST(clang::Sema&, bool, bool) () from /usr/lib/libclang-cpp.so.14
#17 0x00007f17cfdb3f39 in clang::FrontendAction::Execute() () from /usr/lib/libclang-cpp.so.14
#18 0x00007f17cfd53427 in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) () from /usr/lib/libclang-cpp.so.14
#19 0x00007f17cff01c38 in clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) ()
   from /usr/lib/libclang-cpp.so.14
#20 0x00007f17cfee9697 in clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) () from /usr/lib/libclang-cpp.so.14
#21 0x00007f17cff00ee4 in clang::tooling::ToolInvocation::run() () from /usr/lib/libclang-cpp.so.14
#22 0x00007f17cff02930 in clang::tooling::ClangTool::run(clang::tooling::ToolAction*) () from /usr/lib/libclang-cpp.so.14
#23 0x000055581dd4995e in ?? ()
#24 0x00007f17c683c290 in ?? () from /usr/lib/libc.so.6
#25 0x00007f17c683c34a in __libc_start_main () from /usr/lib/libc.so.6
#26 0x000055581dd4a3b5 in ?? ()

SOFTWARE/OS VERSIONS
clazy version 1.11
LLVM (http://llvm.org/):
  LLVM version 14.0.6
  Optimized build.
  Default target: x86_64-pc-linux-gnu
  Host CPU: cascadelake

ADDITIONAL INFORMATION
Resulted from here: https://bugreports.qt.io/browse/QTCREATORBUG-28671