llvm / llvm/llvm-project

clang++ crashes when I'm not prefixing dependent types with "typename" and using a wrong function return type

Open
#196,438 2 comments 0 reactions 0 assignees View on GitHub
clang:frontend crash-on-valid
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

```
$ clang++ -std=c++20 -pedantic-errors -Werror=pedantic 52_make_unique.cpp
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /usr/bin/clang++ -cc1 -triple x86_64-pc-linux-gnu -emit-obj -dumpdir a- -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name 52_make_unique.cp
p -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=all -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb
-fdebug-compilation-dir=/src/worktrees/training/master/cpp -fcoverage-compilation-dir=/src/worktrees/training/master/cpp -resource-dir /usr/lib/clang/22 -internal-isystem /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/15
.2.1/../../../../include/c++/15.2.1 -internal-isystem /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/15.2.1/../../../../include/c++/15.2.1/x86_64-pc-linux-gnu -internal-isystem /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/15
.2.1/../../../../include/c++/15.2.1/backward -internal-isystem /usr/lib/clang/22/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/15.2.1/../../../../x86_64-pc-l
inux-gnu/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -Werror=pedantic -pedantic-errors -std=c++20 -fdeprecated-macro -ferror-limit 19 -fmessage-length=216 -stack-protector 2 -fgn
uc-version=4.2.1 -fno-implicit-modules -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fcolor-diagnostics -faddrsig -fdwarf2-cfi-asm -o /tmp/52_make_unique-37104e.o -x c++ 52_make_unique.cpp
1. parser at end of file
2. 52_make_unique.cpp:57:5: LLVM IR generation of declaration 'main'
3. 52_make_unique.cpp:57:5: Generating code for declaration 'main'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 libLLVM.so.22.1 0x00007fcd7ff56aed llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 61
1 libLLVM.so.22.1 0x00007fcd7ff53bc7
2 libc.so.6 0x00007fcd7ee3e2d0
3 libclang-cpp.so.22.1 0x00007fcd8a29a00e clang::ASTContext::getTypeInfo(clang::Type const*) const + 222
4 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
5 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
6 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
7 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
8 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
9 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
10 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
11 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
12 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
13 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
14 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
15 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
16 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
17 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
18 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
19 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
20 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
21 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
22 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
23 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
24 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
25 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
26 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
27 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
28 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
29 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
30 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
31 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
32 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
33 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
34 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
35 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
36 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
37 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
38 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
39 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
40 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
41 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
42 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
43 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
44 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
45 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
46 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
47 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
48 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
49 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
50 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
51 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
52 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
53 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
54 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
55 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
56 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
57 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
58 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
59 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
60 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
61 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
62 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
63 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
64 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
65 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
66 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
67 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
68 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
69 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
70 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
71 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
72 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
73 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
74 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
75 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
76 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
77 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
78 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
79 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
80 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
81 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
82 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
83 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
84 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
85 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
86 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
87 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
88 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
89 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
90 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
91 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
92 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
93 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
94 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
95 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
96 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
97 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
98 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
99 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
100 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
101 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
102 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
103 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
104 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
105 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
106 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
107 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
108 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
109 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
110 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
111 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
112 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
113 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
114 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
115 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
116 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
117 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
118 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
119 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
120 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
121 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
122 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
123 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
124 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
125 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
126 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
127 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
128 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
129 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
130 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
131 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
132 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
133 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
134 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
135 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
136 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
137 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
138 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
139 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
140 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
141 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
142 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
143 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
144 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
145 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
146 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
147 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
148 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
149 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
150 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
151 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
152 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
153 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
154 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
155 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
156 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
157 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
158 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
159 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
160 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
161 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
162 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
163 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
164 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
165 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
166 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
167 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
168 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
169 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
170 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
171 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
172 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
173 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
174 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
175 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
176 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
177 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
178 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
179 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
180 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
181 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
182 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
183 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
184 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
185 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
186 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
187 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
188 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
189 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
190 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
191 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
192 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
193 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
194 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
195 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
196 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
197 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
198 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
199 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
200 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
201 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
202 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
203 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
204 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
205 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
206 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
207 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
208 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
209 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
210 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
211 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
212 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
213 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
214 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
215 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
216 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
217 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
218 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
219 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
220 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
221 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
222 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
223 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
224 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
225 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
226 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
227 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
228 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
229 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
230 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
231 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
232 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
233 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
234 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
235 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
236 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
237 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
238 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
239 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
240 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
241 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
242 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
243 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
244 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
245 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
246 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
247 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
248 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
249 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
250 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
251 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
252 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
253 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
254 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
255 libclang-cpp.so.22.1 0x00007fcd8a29a013 clang::ASTContext::getTypeInfo(clang::Type const*) const + 227
clang++: error: unable to execute command: Segmentation fault (core dumped)
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 22.1.3
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang++: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang++: note: diagnostic msg: /tmp/52_make_unique-14e99b.cpp
clang++: note: diagnostic msg: /tmp/52_make_unique-14e99b.sh
clang++: note: diagnostic msg:

********************
```
52_make_unique.cpp:
```cpp
# include
# include
# include

template
struct RemoveExtent {
using type = T;
};

template
struct RemoveExtent {
using type = T;
};

template
struct RemoveExtent {
using type = T;
};

template
using RemoveExtentT = /* typename */ RemoveExtent ::type;

template
struct MakeUniqueHelper {
struct single_type {
using type = std::unique_ptr ;
};
};

template
struct MakeUniqueHelper {
struct array_type {
using type = std::unique_ptr ;
};
};

template
struct MakeUniqueHelper {
struct invalid_type {};
};

template
// typename MakeUniqueHelper ::single_type::type MakeUnique (Args && ... args) {
MakeUniqueHelper ::single_type::type MakeUnique (Args && ... args) {
return std::unique_ptr (new T (std::forward (args) ...));
}

template
// typename MakeUniqueHelper ::array_type::type MakeUnique (std::size_t size) {
MakeUniqueHelper ::array_type MakeUnique (std::size_t size) {
return std::unique_ptr (new RemoveExtentT [size] ());
}

template
// typename MakeUniqueHelper ::invalid_type MakeUnique (...) = delete;
MakeUniqueHelper ::invalid_type MakeUnique (...) = delete;

int main () {
std::unique_ptr p1 = MakeUnique (10);
// std::cout << * p1 << std::endl;
// std::unique_ptr p2 = MakeUnique (10);
// p2 [3] = 3;
}
```

[52_make_unique-14e99b.cpp](https://github.com/user-attachments/files/27499200/52_make_unique-14e99b.cpp)
[52_make_unique-14e99b.sh](https://github.com/user-attachments/files/27499201/52_make_unique-14e99b.sh)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.