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

            Bug ID: 363943
           Summary: Crashes while parsing cmake project
           Product: kdevelop
           Version: git master
          Platform: Gentoo Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: grave
          Priority: NOR
         Component: Build tools: CMake
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: eugene.shalygin+bugzilla....@gmail.com

Thread 15 "Queue(0x2c47990" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff8b7ff700 (LWP 6914)]
0x00007fffc5a35196 in QString::QString (this=0x7fff8b7fe760, other=<error
reading variable: Cannot access memory at address 0x0>) at
/usr/include/qt5/QtCore/qstring.h:898
898     inline QString::QString(const QString &other) Q_DECL_NOTHROW :
d(other.d)
(gdb) bt
#0  0x00007fffc5a35196 in QString::QString (this=0x7fff8b7fe760, other=<error
reading variable: Cannot access memory at address 0x0>)
    at /usr/include/qt5/QtCore/qstring.h:898
#1  0x00007fffc5a54be3 in CMakeFunctionArgument::CMakeFunctionArgument
(this=0x7fff8b7fe760)
    at
/usr/src/debug/dev-util/kdevelop-9999/kdevelop-9999/projectmanagers/cmake/parser/cmakelistsparser.h:36
#2  0x00007fffc5a57351 in DeclarationBuilder::startVisiting
(this=0x7fff8b7fe970, node=0x7fff8b7fe940)
    at
/usr/src/debug/dev-util/kdevelop-9999/kdevelop-9999/projectmanagers/cmake/duchain/declarationbuilder.cpp:41
#3  0x00007fffc5a54ac9 in
KDevelop::AbstractContextBuilder<QListIterator<CMakeFunctionDesc>,
CMakeFunctionDesc>::supportBuild (this=0x7fff8b7fe970, node=0x7fff8b7fe940, 
    context=0x7ffe302e85b0) at
/usr/include/kdevplatform/language/duchain/builders/abstractcontextbuilder.h:135
#4  0x00007fffc5a5439b in
KDevelop::AbstractContextBuilder<QListIterator<CMakeFunctionDesc>,
CMakeFunctionDesc>::build (this=0x7fff8b7fe970, url=..., 
    node=0x7fff8b7fe940, updateContext=...) at
/usr/include/kdevplatform/language/duchain/builders/abstractcontextbuilder.h:115
#5  0x00007fffc5a53137 in CMakeParseJob::run (this=0x92978b0) at
/usr/src/debug/dev-util/kdevelop-9999/kdevelop-9999/projectmanagers/cmake/duchain/cmakeparsejob.cpp:108
#6  0x00007fffee6ce87a in
ThreadWeaver::IdDecorator::run(QSharedPointer<ThreadWeaver::JobInterface>,
ThreadWeaver::Thread*) () from /usr/lib64/libKF5ThreadWeaver.so.5
#7  0x00007fffee6cecb7 in
ThreadWeaver::Executor::run(QSharedPointer<ThreadWeaver::JobInterface> const&,
ThreadWeaver::Thread*) () from /usr/lib64/libKF5ThreadWeaver.so.5
#8  0x00007fffee6cd8c0 in
ThreadWeaver::Job::execute(QSharedPointer<ThreadWeaver::JobInterface> const&,
ThreadWeaver::Thread*) () from /usr/lib64/libKF5ThreadWeaver.so.5
#9  0x00007fffee6cd000 in ThreadWeaver::Thread::run() () from
/usr/lib64/libKF5ThreadWeaver.so.5
#10 0x00007ffff1d7128c in QThreadPrivate::start(void*) () from
/usr/lib64/libQt5Core.so.5
#11 0x00007fffeab14424 in start_thread () from /lib64/libpthread.so.0
#12 0x00007ffff117782d in clone () from /lib64/libc.so.6


Reproducible: Always

Steps to Reproduce:
1. open cmake-based project
2. edit a file, trigger build action

Actual Results:  
KDevelop segfaults


gdb) fr 2
#2  0x00007fffc5a57351 in DeclarationBuilder::startVisiting
(this=0x7fff8b7fe970, node=0x7fff8b7fe940)
    at
/usr/src/debug/dev-util/kdevelop-9999/kdevelop-9999/projectmanagers/cmake/duchain/declarationbuilder.cpp:41
41                  CMakeFunctionArgument arg = func.arguments.first();
(gdb) p func
$1 = (const CMakeFunctionDesc &) @0x7fff85675d10: {
  name = "macro", 
  arguments = empty QList<CMakeFunctionArgument>, 
  filePath =
"/home/eugene/develop/xanf/cmake/Modules/MacroOptionalFindPackage.cmake", 
  line = 16, 
  column = 1, 
  endLine = 0, 
  endColumn = 0
}

$ cat /home/eugene/develop/xanf/cmake/Modules/MacroOptionalFindPackage.cmake
# - MACRO_OPTIONAL_FIND_PACKAGE() combines FIND_PACKAGE() with an OPTION()
# MACRO_OPTIONAL_FIND_PACKAGE( <name> [QUIT] )
# This macro is a combination of OPTION() and FIND_PACKAGE(), it
# works like FIND_PACKAGE(), but additionally it automatically creates
# an option name WITH_<name>, which can be disabled via the cmake GUI.
# or via -DWITH_<name>=OFF
# The standard <name>_FOUND variables can be used in the same way
# as when using the normal FIND_PACKAGE()

# Copyright (c) 2006, Alexander Neundorf, <neund...@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.


macro (MACRO_OPTIONAL_FIND_PACKAGE _name )
   option(WITH_${_name} "Search for ${_name} package" ON)
   if (WITH_${_name})
      find_package(${_name} ${ARGN})
   else (WITH_${_name})
      set(${_name}_FOUND)
      set(${_name}_INCLUDE_DIR)
      set(${_name}_INCLUDES)
      set(${_name}_LIBRARY)
      set(${_name}_LIBRARIES)
   endif (WITH_${_name})
endmacro (MACRO_OPTIONAL_FIND_PACKAGE)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to