[clazy] [Bug 464372] New: clazy-standalone crashes with assertion

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Mon Jan 16 11:51:12 GMT 2023


https://bugs.kde.org/show_bug.cgi?id=464372

            Bug ID: 464372
           Summary: clazy-standalone crashes with assertion
    Classification: Developer tools
           Product: clazy
           Version: unspecified
          Platform: Archlinux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: unassigned-bugs at kde.org
          Reporter: christian.kandeler at qt.io
                CC: smartins at kde.org
  Target Milestone: ---

Created attachment 155346
  --> https://bugs.kde.org/attachment.cgi?id=155346&action=edit
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

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Unassigned-bugs mailing list