Bug#805302: Acknowledgement (qtcreator: hangs when parsing code using c++11 STL vector)
I haven't been watching the issue for some time and, when I tried the code with current QtCreator in debian testing(3.6.1-1), I could no longer observe the issue. Unless anybody else observes the issue, this bug report can be closed. Regards, Dominik Wójt
Bug#805302: Acknowledgement (qtcreator: hangs when parsing code using c++11 STL vector)
I found the problem can be avoided by using the clang code model. Regards, Dominik Wójt
Bug#805302: qtcreator: hangs when parsing code using c++11 STL vector
Package: qtcreator Version: 3.5.1+dfsg-2 Severity: normal Dear Maintainer, The issue can be reporduced using the attached CMakeLists.txt and qt_creator_hang.cpp files. The code itself is non-sensical, but seems to be synctatically valid and gets compiled cleanly. It has been extracted from a much longer sorce file. Once the project is opened with QtCrator and qt_creator_hang.cpp is opened in editor, htop shows 100% cpu usage on one core. When user tries to edit the qt_creator_hang.cpp file additional threads are spawned and all available cpu cores are getting full load. Though QtCreator seems to continue to work correctly, it connot be cleanly closed once the issue appears. The issue is not observed, when the following line is skipped in CMakeLists.txt. set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++11" ) With the above line skipped QtCreator also get 100% usage after opening the qt_creator_hang.cpp, but the load drops in a few seconds. Also, when editing the file additional threads are being spawned and additional cores are being employed, but the load drops back to low after a few seconds without input. Regards, Dominik Wójt -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.2.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=pl_PL.utf8, LC_CTYPE=pl_PL.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages qtcreator depends on: ii libbotan-1.10-1 1.10.10-6+b1 ii libc6 2.19-22 ii libclang1-3.6 1:3.6.2-3 ii libgcc1 1:5.2.1-23 ii libqbscore1 1.4.3+dfsg-3 ii libqbsqtprofilesetup1 1.4.3+dfsg-3 ii libqt5concurrent5 5.5.1+dfsg-6 ii libqt5core5a [qtbase-abi-5-5-1] 5.5.1+dfsg-6 ii libqt5designer5 5.5.1-3 ii libqt5designercomponents5 5.5.1-3 ii libqt5gui55.5.1+dfsg-6 ii libqt5help5 5.5.1-3 ii libqt5network55.5.1+dfsg-6 ii libqt5printsupport5 5.5.1+dfsg-6 ii libqt5qml5 [qtdeclarative-abi-5-5-0] 5.5.1-3 ii libqt5quick5 5.5.1-3 ii libqt5quickwidgets5 5.5.1-3 ii libqt5sql55.5.1+dfsg-6 ii libqt5sql5-sqlite 5.5.1+dfsg-6 ii libqt5webkit5 5.5.1+dfsg-2 ii libqt5widgets55.5.1+dfsg-6 ii libqt5xml55.5.1+dfsg-6 ii libstdc++65.2.1-23 ii qml-module-qtquick-controls 5.5.1-2 ii qml-module-qtquick2 5.5.1-3 ii qtchooser 52-gae5eeef-2 ii qtcreator-data3.5.1+dfsg-2 Versions of packages qtcreator recommends: ii gdb 7.10-1 ii make 4.0-8.2 pn qt5-doc ii qtbase5-dev-tools 5.5.1+dfsg-6 ii qtcreator-doc 3.5.1+dfsg-2 ii qtdeclarative5-dev-tools 5.5.1-3 ii qttools5-dev-tools5.5.1-3 ii qttranslations5-l10n 5.5.1-2 ii qtxmlpatterns5-dev-tools 5.5.1-2 ii xfce4-terminal [x-terminal-emulator] 0.6.3-2 ii xterm [x-terminal-emulator] 320-1 Versions of packages qtcreator suggests: ii cmake 3.3.2-2 ii g++4:5.2.1-4 ii git1:2.6.2-1 pn kdelibs5-data pn subversion #include struct B { struct C { int m_y; }; }; int main() { const std::vector cV; std::vector::const_iterator end = cV.end(); for( std::vector::const_reverse_iterator i = cV.rbegin(); i != cV.rend(); ++i) { if(i->m_y) { end = i.base(); break; } } return 1; } cmake_minimum_required(VERSION 2.6) project(qtcreator_hang) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") # using Clang set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++11" ) elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") # using GCC set( CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-std=c++11" ) elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel") # using Intel C++ elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") # using Visual Studio C++ endif() add_executable(qt_creator_hang qt_creator_hang.cpp)
Bug#758007: clang-3.4: generated executable receives SIGSEGFAULT when compiled with -O2
Package: clang-3.4 Version: 1:3.4.2-6 Severity: important Dear Maintainer, The attached simple example receives SIGSEGFAULT when compiled with this command: clang++ -O2 -g -o segfault segfault.cpp segault.cpp: #include #include class SampleYVector { public: SampleYVector() :x(0) ,y(0) {} SampleYVector(int x_, int y_) :x(x_) ,y(y_) {} SampleYVector& operator&= (const int mask) { x &= mask; y &= mask; return *this; } int x; int y; }; SampleYVector operator& (const SampleYVector &lhs, const int mask) { SampleYVector temp(lhs); temp &= mask; return temp; } struct InterPrediction { public: int leftDataMargin; int rightDataMargin; void test(const SampleYVector &mv); }; void getMargins(const int fractional, int &topLeftMargin, int &bottomRightMargin) { switch (fractional) { case 0: topLeftMargin = 0; bottomRightMargin = 0; break; case 1: topLeftMargin = 3; bottomRightMargin = 3; break; case 2: topLeftMargin = 3; bottomRightMargin = 4; break; case 3: topLeftMargin = 2; bottomRightMargin = 4; break; case 4: topLeftMargin = 1; bottomRightMargin = 2; break; default: assert(false); break; } } void InterPrediction::test(const SampleYVector &mv) { const SampleYVector mvFrac = mv & 3; std::cout << mvFrac.x << "x" << mvFrac.y << '\n'; const int fractionalX = 0; std::cout << fractionalX << std::endl; getMargins(mvFrac.x, leftDataMargin, rightDataMargin); } int main() { SampleYVector mv(0, 2); InterPrediction interPrediction; interPrediction.test(mv); return 0; } run with: $ ./segfault 0x2 0 this = 0x7fff11f9ed18 &mv = 0x7fff11f9ed20 Segmentation fault When compiled without "-O2" the executable executes successfully. Best regards, Dominik Wójt -- System Information: Debian Release: jessie/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.14-2-amd64 (SMP w/8 CPU cores) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages clang-3.4 depends on: ii libc62.19-7 ii libc6-dev2.19-7 ii libclang-common-3.4-dev 1:3.4.2-6 ii libclang1-3.41:3.4.2-6 ii libffi6 3.1-2 ii libgcc-4.9-dev 4.9.1-4 ii libgcc1 1:4.9.1-4 ii libllvm3.4 1:3.4.2-6 ii libobjc-4.9-dev 4.9.1-4 ii libstdc++-4.9-dev4.9.1-4 ii libstdc++6 4.9.1-4 ii libtinfo55.9+20140712-2 Versions of packages clang-3.4 recommends: ii llvm-3.4-dev 1:3.4.2-6 ii python2.7.8-1 Versions of packages clang-3.4 suggests: pn clang-3.4-doc pn gnustep pn gnustep-devel -- no debconf information -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#619011: Acknowledgement (libarpack++2-dev: STL vector support not functioning)
One more thing. I have wasted some time trying to compile my code until I found out that the Debian version of library in contrast to the original one is not solely in headers and needs an additional parameter at compilation so now the parameters needed for compilation are -lblas -lgfortran -lgfortranbegin -lnsl -larpack -larpack++ It would be good to remark this in one of the files in documentation e.g. /usr/share/doc/libarpack++2c2a/README.Debian It is important as I didn't find any hints anywhere on the net. Regards, Dominik Wójt -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#619011: libarpack++2-dev: STL vector support not functioning
Package: libarpack++2-dev Version: 2.3-1.1 Severity: normal Header file arch.h has been patched to use newer namespace based header for STL vectors. #inlcude has been changed to: #include while in file arssym.h dirctive: #ifdef STL_VECTOR_H is still used and the vector<> is used without std:: namespace qualifier. Header file seems to be not availble any longer. Using: #include #define STL_VECTOR_H // !!! trying to get around the problem with old headers used using namespace std; #include doesn't help as I get: -- Build: Debug in lab02 --- Compiling: ArpackWrapper.cc In file included from /usr/include/arpack++/arssym.h:23:0, from /mnt/dane/dokumenty/pwr/magisterskie/2011l/OOP/lab02/ArpackWrapper.cc:6: /usr/include/arpack++/arrssym.h: In member function ‘std::vector* ARrcSymStdEig::StlEigenvalues(bool, bool)’: /usr/include/arpack++/arrssym.h:347:50: error: there are no arguments to ‘ValSize’ that depend on a template parameter, so a declaration of ‘ValSize’ must be available /usr/include/arpack++/arrssym.h:347:50: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated) /usr/include/arpack++/arrssym.h:350:3: error: ‘nconv’ was not declared in this scope /usr/include/arpack++/arrssym.h: In member function ‘std::vector* ARrcSymStdEig::StlEigenvector(int)’: /usr/include/arpack++/arrssym.h:364:8: error: ‘VectorsOK’ was not declared in this scope /usr/include/arpack++/arrssym.h:367:24: error: there are no arguments to ‘ValSize’ that depend on a template parameter, so a declaration of ‘ValSize’ must be available /usr/include/arpack++/arrssym.h:371:32: error: ‘EigVec’ was not declared in this scope /usr/include/arpack++/arrssym.h:371:41: error: ‘n’ was not declared in this scope /mnt/dane/dokumenty/pwr/magisterskie/2011l/OOP/lab02/ArpackWrapper.cc: In function ‘void Lanczos_symm(Eigen::SparseMatrix&, std::vector&, std::vector >&)’: /mnt/dane/dokumenty/pwr/magisterskie/2011l/OOP/lab02/ArpackWrapper.cc:42:95: warning: deprecated conversion from string constant to ‘char*’ /mnt/dane/dokumenty/pwr/magisterskie/2011l/OOP/lab02/ArpackWrapper.cc:43:46: error: no match for ‘operator=’ in ‘eigenVectors = * prob.ARSymStdEig::.ARrcStdEig::StlEigenvectors [with ARFLOAT = double, ARTYPE = double](0)’ /usr/include/c++/4.5/bits/vector.tcc:156:5: note: candidate is: std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = Eigen::Matrix, _Alloc = std::allocator >] In file included from /usr/include/arpack++/arseig.h:25:0, from /usr/include/arpack++/arssym.h:22, from /mnt/dane/dokumenty/pwr/magisterskie/2011l/OOP/lab02/ArpackWrapper.cc:6: /usr/include/arpack++/arrseig.h: In member function ‘std::vector* ARrcStdEig::StlEigenvectors(bool) [with ARFLOAT = double, ARTYPE = double]’: /mnt/dane/dokumenty/pwr/magisterskie/2011l/OOP/lab02/ArpackWrapper.cc:43:44: instantiated from here /usr/include/arpack++/arrseig.h:1416:3: error: cannot convert ‘std::vector::iterator’ to ‘double*’ in assignment In file included from /usr/include/arpack++/arssym.h:23:0, from /mnt/dane/dokumenty/pwr/magisterskie/2011l/OOP/lab02/ArpackWrapper.cc:6: /usr/include/arpack++/arrssym.h: In member function ‘std::vector* ARrcSymStdEig::StlEigenvalues(bool, bool) [with ARFLOAT = double]’: /mnt/dane/dokumenty/pwr/magisterskie/2011l/OOP/lab02/ArpackWrapper.cc:44:42: instantiated from here /usr/include/arpack++/arrssym.h:349:3: error: cannot convert ‘std::vector::iterator’ to ‘double*’ in assignment Process terminated with status 1 (0 minutes, 1 seconds) 11 errors, 1 warnings (0 minutes, 1 seconds) lines 42 to 44 of my file: ARSymStdEig< double, TMatrixForArpackpp > prob( n, n, &M_arp, &TMatrixForArpackpp::MultMv ); eigenVectors = *( prob.StlEigenvectors() ); eigenValues = *( prob.StlEigenvalues() ); For now I will resign from using StlEigenvalues() and StlEigenvectors() and just stick to array functions. -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores) Locale: LANG=pl_PL.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages libarpack++2-dev depends on: ii libarpack++2c2a 2.3-1.1 Object-oriented version of the ARP ii libarpack2-dev 2.1+parpack96.dfsg-3+b1 Fortran77 subroutines to solve lar libarpack++2-dev recommends no packages. libarpack++2-dev suggests no packages. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org