Bug 422716 - using gcc10 as compiler while including <ranges> crashes kdevelop
Summary: using gcc10 as compiler while including <ranges> crashes kdevelop
Status: RESOLVED DUPLICATE of bug 421704
Alias: None
Product: kdevelop
Classification: Applications
Component: general (show other bugs)
Version: 5.4.6
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2020-06-10 06:16 UTC by Radu Benea
Modified: 2020-06-17 01:34 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (65.39 KB, text/plain)
2020-06-10 06:16 UTC, Radu Benea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Radu Benea 2020-06-10 06:16:49 UTC
Application: kdevelop (5.4.6)

Qt Version: 5.14.2
Frameworks Version: 5.70.0
Operating System: Linux 5.6.15-gentoo x86_64
Windowing system: X11
Distribution: "Gentoo Base System release 2.6"

-- Information about the crash:
- What I was doing when the application crashed:
I went to
Project->Open Configuration->Language Support->C/C++ parser
and switch the "Compiler for path" option to GCC10

- Custom settings of the application:
in Settings->Configure KDevelop->C/C++ Compilers
I manually added an entry named GCC10 with "Compiler executable" set to gcc-10.1.0

This was in a project created from
Project->New From Template...->Standard->Terminal->CMake C++
in which I just added the line
#include <ranges>

The crash can be reproduced every time.

-- Backtrace (Reduced):
#5  0x00007ff7329f3826 in isSameEntity(clang::NamedDecl*, clang::NamedDecl*) () from /usr/lib/llvm/10/lib64/libclang.so.10
#6  0x00007ff732a20170 in clang::ASTDeclReader::findExisting(clang::NamedDecl*) () from /usr/lib/llvm/10/lib64/libclang.so.10
#7  0x00007ff732a281d0 in void clang::ASTDeclReader::mergeRedeclarable<clang::RedeclarableTemplateDecl>(clang::Redeclarable<clang::RedeclarableTemplateDecl>*, clang::ASTDeclReader::RedeclarableResult&, unsigned int) () from /usr/lib/llvm/10/lib64/libclang.so.10
#8  0x00007ff732a282cc in clang::ASTDeclReader::VisitRedeclarableTemplateDecl(clang::RedeclarableTemplateDecl*) () from /usr/lib/llvm/10/lib64/libclang.so.10
#9  0x00007ff732a2913f in clang::ASTDeclReader::VisitFunctionTemplateDecl(clang::FunctionTemplateDecl*) () from /usr/lib/llvm/10/lib64/libclang.so.10


The reporter indicates this bug may be a duplicate of or related to bug 421704.

Possible duplicates by query: bug 422533, bug 422509, bug 422200, bug 422009, bug 421930.

Reported using DrKonqi
Comment 1 Radu Benea 2020-06-10 06:16:50 UTC
Created attachment 129178 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Matt Whitlock 2020-06-16 03:36:55 UTC
The following is a minimal reproducer of the crash...


/* BEGIN bug.h */

	#include <concepts>
	
	template <typename T1, typename T2>
	concept Foo = true;
	
	template <typename T1, typename T2>
	struct Bug
	{
		template <Foo<Bug> T>
		Bug(T&&) requires true
		{ }
	
		template <Foo<Bug> T>
		Bug(T&&)
		{ }
	};
	
	template <typename T1, typename T2>
	Bug(T1, T2) -> Bug<T1, T2>;

/* END bug.h */


/* BEGIN bug.cpp */

	#include "bug.h"

/* END bug.cpp */


Place bug.h and bug.cpp in a KDevelop project in C++2a mode. Kaboom!
Comment 3 Aaron Puchert 2020-06-17 01:34:23 UTC
(In reply to Radu Benea from comment #0)
> The reporter indicates this bug may be a duplicate of or related to bug 421704.
There may be more issues in Clang related to concepts and AST serialization, but I don't think it makes sense to track them separately for KDevelop. So I'll close this as duplicate.

(In reply to Matt Whitlock from comment #2)
> The following is a minimal reproducer of the crash...
Thanks again, such minimal reproducers are extremely valuable for debugging the issue.

*** This bug has been marked as a duplicate of bug 421704 ***