Commit Graph

3633 Commits

Author SHA1 Message Date
practicalswift
69866e942b [swiftc (98 vs. 5180)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 98 (5180 resolved)

Stack trace:

```
0  swift           0x00000000031dec28
1  swift           0x00000000031df4a6
2  libpthread.so.0 0x00007f76ca7e0330
3  libc.so.6       0x00007f76c8f9ec37 gsignal + 55
4  libc.so.6       0x00007f76c8fa2028 abort + 328
5  swift           0x0000000000d8018f
6  swift           0x0000000000d838af
7  swift           0x0000000000d79e5c
8  swift           0x0000000000d8a740
9  swift           0x0000000000d8aa36
10 swift           0x0000000000d8a71c
11 swift           0x0000000000d8982d
12 swift           0x0000000000d88d72
13 swift           0x0000000000d88c74
14 swift           0x0000000000dde2ee
15 swift           0x0000000000d707bc
16 swift           0x0000000000b1d023
17 swift           0x0000000000b54610
18 swift           0x0000000000958b03
19 swift           0x00000000004a050e
20 swift           0x00000000004674de
21 libc.so.6       0x00007f76c8f89f45 __libc_start_main + 245
22 swift           0x0000000000464be6
```
2016-11-03 15:32:47 +01:00
practicalswift
10659cbf31 [swiftc (97 vs. 5180)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 97 (5180 resolved)

Stack trace:

```
0  swift           0x00000000031dec28
1  swift           0x00000000031df4a6
2  libpthread.so.0 0x00007f0acf905330
3  swift           0x0000000000dc5ddc
4  swift           0x0000000000c27031
5  swift           0x0000000000c3272c
6  swift           0x0000000000c30dfb
7  swift           0x0000000000c28ee1
8  swift           0x0000000000c28bdd
9  swift           0x0000000000c29cf8
10 swift           0x0000000000c29df4
11 swift           0x0000000000c29bef
12 swift           0x0000000000c28379
13 swift           0x0000000000bd028b
14 swift           0x0000000000bc3656
15 swift           0x0000000000bc3456
16 swift           0x0000000000c22acf
17 swift           0x0000000000c21bf5
18 swift           0x0000000000c221a6
19 swift           0x0000000000c4007c
20 swift           0x0000000000baeb04
21 swift           0x0000000000c22b24
22 swift           0x0000000000c22346
23 swift           0x0000000000c360fa
24 swift           0x0000000000958b26
25 swift           0x00000000004a050e
26 swift           0x00000000004674de
27 libc.so.6       0x00007f0ace0aef45 __libc_start_main + 245
28 swift           0x0000000000464be6
```
2016-11-03 09:13:14 +01:00
Mark Lacey
c7f448f972 Do not assume Set/Dictionary are always bound generic types.
In cases where we cannot infer the types they won't be, so we don't want
to just cast to BoundGenericType when we see these.

Fixes rdar://problem/28317710 and at least one dup (and I think a few
more).
2016-11-03 00:42:03 -07:00
Mark Lacey
18c809d1d4 Fix crash in member lookup when base type contains type variables.
We were crashing during performTypoCorrection if the base type contained
type variables.

rdar://problem/28387684
2016-11-02 21:12:47 -07:00
Graydon Hoare
9351843d7a Merge pull request #5588 from graydon/rdar-27397701-synthesized-get-set-typechecking-redux
Rdar 27397701 synthesized get set typechecking
2016-11-02 17:57:20 -07:00
swift-ci
cc9dd47448 Merge pull request #5607 from graydon/scale-test-improvements 2016-11-02 15:08:08 -07:00
Graydon Hoare
97807aad79 [Compile perf] Add tools-release lit configury 2016-11-02 14:05:02 -07:00
swift-ci
a89a04acb3 Merge pull request #5612 from benlangmuir/disable-flaky-crash 2016-11-02 11:38:41 -07:00
Ben Langmuir
b35d891bd1 Disable compiler_crashers/28447-result-case-not-implemented-failed.swift
This test doesn't reproduce 100% of the time, so let's disable it.  I
filed SR-3118 to make sure we don't lose track of it.

rdar://problem/29069838
2016-11-02 10:59:56 -07:00
practicalswift
3a9bef9d91 [swiftc (96 vs. 5180)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 96 (5180 resolved)

Stack trace:

```
0  swift           0x00000000031dc7e8
1  swift           0x00000000031dd066
2  libpthread.so.0 0x00007f1346013330
3  libc.so.6       0x00007f13447d1c37 gsignal + 55
4  libc.so.6       0x00007f13447d5028 abort + 328
5  swift           0x0000000000d7e52f
6  swift           0x0000000000d81c4f
7  swift           0x0000000000d781fc
8  swift           0x0000000000d88ae0
9  swift           0x0000000000d8b8d3
10 swift           0x0000000000d88bfa
11 swift           0x0000000000d88abc
12 swift           0x0000000000d873fe
13 swift           0x0000000000d87014
14 swift           0x0000000000ddbf1e
15 swift           0x0000000000d6eb5c
16 swift           0x0000000000b1b473
17 swift           0x0000000000b529d0
18 swift           0x0000000000957db3
19 swift           0x00000000004a050e
20 swift           0x00000000004674de
21 libc.so.6       0x00007f13447bcf45 __libc_start_main + 245
22 swift           0x0000000000464be6
```
2016-11-02 18:59:10 +01:00
practicalswift
3c0018f426 [swiftc (95 vs. 5180)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 95 (5180 resolved)

Stack trace:

```
0  swift           0x00000000031dc7e8
1  swift           0x00000000031dd066
2  libpthread.so.0 0x00007f6966c61330
3  libc.so.6       0x00007f696541fc37 gsignal + 55
4  libc.so.6       0x00007f6965423028 abort + 328
5  swift           0x0000000000d7e52f
6  swift           0x0000000000d81c4f
7  swift           0x0000000000d781fc
8  swift           0x0000000000d88ae0
9  swift           0x0000000000d8b8d3
10 swift           0x0000000000d8bc9d
11 swift           0x0000000000d89bea
12 swift           0x0000000000d88b5f
13 swift           0x0000000000d873fe
14 swift           0x0000000000d87014
15 swift           0x0000000000ddbf1e
16 swift           0x0000000000d6eb5c
17 swift           0x0000000000b1b473
18 swift           0x0000000000b529d0
19 swift           0x0000000000957db3
20 swift           0x00000000004a050e
21 swift           0x00000000004674de
22 libc.so.6       0x00007f696540af45 __libc_start_main + 245
23 swift           0x0000000000464be6
```
2016-11-02 18:12:42 +01:00
Graydon Hoare
e2a7a891ff [Compile perf] rdar://27397701 Add multifile accessor scale-test 2016-11-02 10:00:18 -07:00
practicalswift
3575ee1954 [swiftc (94 vs. 5180)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 94 (5180 resolved)

Stack trace:

```
0  swift           0x00000000031dc7e8
1  swift           0x00000000031dd066
2  libpthread.so.0 0x00007f840c562330
3  libc.so.6       0x00007f840ad20c37 gsignal + 55
4  libc.so.6       0x00007f840ad24028 abort + 328
5  swift           0x0000000000d7e52f
6  swift           0x0000000000d81c4f
7  swift           0x0000000000d781fc
8  swift           0x0000000000d88ae0
9  swift           0x0000000000d8b8d3
10 swift           0x0000000000d89b94
11 swift           0x0000000000d8a19d
12 swift           0x0000000000d8a3b1
13 swift           0x0000000000d88b5f
14 swift           0x0000000000d873fe
15 swift           0x0000000000d87014
16 swift           0x0000000000ddbf1e
17 swift           0x0000000000d6eb5c
18 swift           0x0000000000b1b473
19 swift           0x0000000000b529d0
20 swift           0x0000000000957db3
21 swift           0x00000000004a050e
22 swift           0x00000000004674de
23 libc.so.6       0x00007f840ad0bf45 __libc_start_main + 245
24 swift           0x0000000000464be6
```
2016-11-02 17:22:54 +01:00
practicalswift
57f3f0e95d [swiftc (93 vs. 5180)] Add crasher in statements on a line must be separated by ';'
Add test case for crash triggered in `statements on a line must be separated by ';'`.

Current number of unresolved compiler crashers: 93 (5180 resolved)

Stack trace:

```
0  swift           0x00000000031dc7e8
1  swift           0x00000000031dd066
2  libpthread.so.0 0x00007fc3c0497330
3  swift           0x0000000000cde5c9
4  swift           0x0000000000d073ae
5  swift           0x0000000000cde571
6  swift           0x0000000000d073ff
7  swift           0x0000000000cde571
8  swift           0x0000000000d073ff
9  swift           0x0000000000cde571
10 swift           0x0000000000d073ff
11 swift           0x0000000000cde571
12 swift           0x0000000000d073ff
13 swift           0x0000000000cde571
14 swift           0x0000000000d073ff
15 swift           0x0000000000cde571
16 swift           0x0000000000d073ff
17 swift           0x0000000000cde571
18 swift           0x0000000000d073ff
19 swift           0x0000000000cde571
20 swift           0x0000000000d073ff
21 swift           0x0000000000cde571
22 swift           0x0000000000d073ff
23 swift           0x0000000000cde571
24 swift           0x0000000000d073ff
25 swift           0x0000000000cde571
26 swift           0x0000000000d073ff
27 swift           0x0000000000cde571
28 swift           0x0000000000d073ff
29 swift           0x0000000000cde571
30 swift           0x0000000000d073ff
31 swift           0x0000000000cde571
32 swift           0x0000000000d073ff
33 swift           0x0000000000cde571
34 swift           0x0000000000d073ff
35 swift           0x0000000000cde571
36 swift           0x0000000000d073ff
37 swift           0x0000000000cde571
38 swift           0x0000000000d073ff
39 swift           0x0000000000cde571
40 swift           0x0000000000d073ff
41 swift           0x0000000000cde571
42 swift           0x0000000000d073ff
43 swift           0x0000000000cde571
44 swift           0x0000000000d073ff
45 swift           0x0000000000cde571
46 swift           0x0000000000d073ff
47 swift           0x0000000000cde571
48 swift           0x0000000000d073ff
49 swift           0x0000000000cde571
50 swift           0x0000000000d073ff
51 swift           0x0000000000cde571
52 swift           0x0000000000d073ff
53 swift           0x0000000000cde571
54 swift           0x0000000000d073ff
55 swift           0x0000000000cde571
56 swift           0x0000000000d073ff
57 swift           0x0000000000cde571
58 swift           0x0000000000d073ff
59 swift           0x0000000000cde571
60 swift           0x0000000000d073ff
61 swift           0x0000000000cde571
62 swift           0x0000000000d073ff
63 swift           0x0000000000cde571
64 swift           0x0000000000d073ff
65 swift           0x0000000000cde571
66 swift           0x0000000000d073ff
67 swift           0x0000000000cde571
68 swift           0x0000000000d073ff
69 swift           0x0000000000cde571
70 swift           0x0000000000d073ff
71 swift           0x0000000000cde571
72 swift           0x0000000000d073ff
73 swift           0x0000000000cde571
74 swift           0x0000000000d073ff
75 swift           0x0000000000cde571
76 swift           0x0000000000d073ff
77 swift           0x0000000000cde571
78 swift           0x0000000000d073ff
79 swift           0x0000000000cde571
80 swift           0x0000000000d073ff
81 swift           0x0000000000cde571
82 swift           0x0000000000d073ff
83 swift           0x0000000000cde571
84 swift           0x0000000000d073ff
85 swift           0x0000000000cde571
86 swift           0x0000000000d073ff
87 swift           0x0000000000cde571
88 swift           0x0000000000d073ff
89 swift           0x0000000000cde571
90 swift           0x0000000000d073ff
91 swift           0x0000000000cde571
92 swift           0x0000000000d073ff
93 swift           0x0000000000cde571
94 swift           0x0000000000d073ff
95 swift           0x0000000000cde571
96 swift           0x0000000000d073ff
97 swift           0x0000000000cde571
98 swift           0x0000000000d073ff
99 swift           0x0000000000cde571
100 swift           0x0000000000d073ff
101 swift           0x0000000000cde571
102 swift           0x0000000000d073ff
103 swift           0x0000000000cde571
104 swift           0x0000000000d073ff
105 swift           0x0000000000cde571
106 swift           0x0000000000d073ff
107 swift           0x0000000000cde571
108 swift           0x0000000000d073ff
109 swift           0x0000000000cde571
110 swift           0x0000000000d073ff
111 swift           0x0000000000cde571
112 swift           0x0000000000d073ff
113 swift           0x0000000000cde571
114 swift           0x0000000000d073ff
115 swift           0x0000000000cde571
116 swift           0x0000000000d073ff
117 swift           0x0000000000cde571
118 swift           0x0000000000d073ff
119 swift           0x0000000000cde571
120 swift           0x0000000000d073ff
121 swift           0x0000000000cde571
122 swift           0x0000000000d073ff
123 swift           0x0000000000cde571
124 swift           0x0000000000d073ff
125 swift           0x0000000000cde571
126 swift           0x0000000000d073ff
127 swift           0x0000000000cde571
128 swift           0x0000000000d073ff
129 swift           0x0000000000cde571
130 swift           0x0000000000d073ff
131 swift           0x0000000000cde571
132 swift           0x0000000000d073ff
133 swift           0x0000000000cde571
134 swift           0x0000000000d073ff
135 swift           0x0000000000cde571
136 swift           0x0000000000d073ff
137 swift           0x0000000000cde571
138 swift           0x0000000000d073ff
139 swift           0x0000000000cde571
140 swift           0x0000000000d073ff
141 swift           0x0000000000cde571
142 swift           0x0000000000d073ff
143 swift           0x0000000000cde571
144 swift           0x0000000000d073ff
145 swift           0x0000000000cde571
146 swift           0x0000000000d073ff
147 swift           0x0000000000cde571
148 swift           0x0000000000d073ff
149 swift           0x0000000000cde571
150 swift           0x0000000000d073ff
151 swift           0x0000000000cde571
152 swift           0x0000000000d073ff
153 swift           0x0000000000cde571
154 swift           0x0000000000d073ff
155 swift           0x0000000000cde571
156 swift           0x0000000000d073ff
157 swift           0x0000000000cde571
158 swift           0x0000000000d073ff
159 swift           0x0000000000cde571
160 swift           0x0000000000d073ff
161 swift           0x0000000000cde571
162 swift           0x0000000000d073ff
163 swift           0x0000000000cde571
164 swift           0x0000000000d073ff
165 swift           0x0000000000cde571
166 swift           0x0000000000d073ff
167 swift           0x0000000000cde571
168 swift           0x0000000000d073ff
169 swift           0x0000000000cde571
170 swift           0x0000000000d073ff
171 swift           0x0000000000cde571
172 swift           0x0000000000d073ff
173 swift           0x0000000000cde571
174 swift           0x0000000000d073ff
175 swift           0x0000000000cde571
176 swift           0x0000000000d073ff
177 swift           0x0000000000cde571
178 swift           0x0000000000d073ff
179 swift           0x0000000000cde571
180 swift           0x0000000000d073ff
181 swift           0x0000000000cde571
182 swift           0x0000000000d073ff
183 swift           0x0000000000cde571
184 swift           0x0000000000d073ff
185 swift           0x0000000000cde571
186 swift           0x0000000000d073ff
187 swift           0x0000000000cde571
188 swift           0x0000000000d073ff
189 swift           0x0000000000cde571
190 swift           0x0000000000d073ff
191 swift           0x0000000000cde571
192 swift           0x0000000000d073ff
193 swift           0x0000000000cde571
194 swift           0x0000000000d073ff
195 swift           0x0000000000cde571
196 swift           0x0000000000d073ff
197 swift           0x0000000000cde571
198 swift           0x0000000000d073ff
199 swift           0x0000000000cde571
200 swift           0x0000000000d073ff
201 swift           0x0000000000cde571
202 swift           0x0000000000d073ff
203 swift           0x0000000000cde571
204 swift           0x0000000000d073ff
205 swift           0x0000000000cde571
206 swift           0x0000000000d073ff
207 swift           0x0000000000cde571
208 swift           0x0000000000d073ff
209 swift           0x0000000000cde571
210 swift           0x0000000000d073ff
211 swift           0x0000000000cde571
212 swift           0x0000000000d073ff
213 swift           0x0000000000cde571
214 swift           0x0000000000d073ff
215 swift           0x0000000000cde571
216 swift           0x0000000000d073ff
217 swift           0x0000000000cde571
218 swift           0x0000000000d073ff
219 swift           0x0000000000cde571
220 swift           0x0000000000d073ff
221 swift           0x0000000000cde571
222 swift           0x0000000000d073ff
223 swift           0x0000000000cde571
224 swift           0x0000000000d073ff
225 swift           0x0000000000cde571
226 swift           0x0000000000d073ff
227 swift           0x0000000000cde571
228 swift           0x0000000000d073ff
229 swift           0x0000000000cde571
230 swift           0x0000000000d073ff
231 swift           0x0000000000cde571
232 swift           0x0000000000d073ff
233 swift           0x0000000000cde571
234 swift           0x0000000000d073ff
235 swift           0x0000000000cde571
236 swift           0x0000000000d073ff
237 swift           0x0000000000cde571
238 swift           0x0000000000d073ff
239 swift           0x0000000000cde571
240 swift           0x0000000000d073ff
241 swift           0x0000000000cde571
242 swift           0x0000000000d073ff
243 swift           0x0000000000cde571
244 swift           0x0000000000d073ff
245 swift           0x0000000000cde571
246 swift           0x0000000000d073ff
247 swift           0x0000000000cde571
248 swift           0x0000000000d073ff
249 swift           0x0000000000cde571
250 swift           0x0000000000d073ff
251 swift           0x0000000000cde571
252 swift           0x0000000000d073ff
253 swift           0x0000000000cde571
254 swift           0x0000000000d073ff
255 swift           0x0000000000cde571
```
2016-11-02 16:05:31 +01:00
practicalswift
1432beecac [swiftc (92 vs. 5180)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 92 (5180 resolved)

Stack trace:

```
0  swift           0x00000000031dc7e8
1  swift           0x00000000031dd066
2  libpthread.so.0 0x00007fd8ac048330
3  libc.so.6       0x00007fd8aa806c37 gsignal + 55
4  libc.so.6       0x00007fd8aa80a028 abort + 328
5  swift           0x0000000000d7e52f
6  swift           0x0000000000d81c4f
7  swift           0x0000000000d78180
8  swift           0x0000000000d88ae0
9  swift           0x0000000000d8b8d3
10 swift           0x0000000000d8a3b1
11 swift           0x0000000000d87ec1
12 swift           0x0000000000d87a9c
13 swift           0x0000000000d87112
14 swift           0x0000000000d87014
15 swift           0x0000000000ddbf1e
16 swift           0x0000000000d6eb5c
17 swift           0x0000000000b1b473
18 swift           0x0000000000b529d0
19 swift           0x0000000000957db3
20 swift           0x00000000004a050e
21 swift           0x00000000004674de
22 libc.so.6       0x00007fd8aa7f1f45 __libc_start_main + 245
23 swift           0x0000000000464be6
```
2016-11-02 12:53:08 +01:00
practicalswift
2674dc3f91 [swiftc (91 vs. 5180)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 91 (5180 resolved)

Stack trace:

```
0  swift           0x00000000031dc7e8
1  swift           0x00000000031dd066
2  libpthread.so.0 0x00007fe190d1d330
3  libc.so.6       0x00007fe18f4dbc37 gsignal + 55
4  libc.so.6       0x00007fe18f4df028 abort + 328
5  swift           0x0000000000d7e52f
6  swift           0x0000000000d81c4f
7  swift           0x0000000000d781fc
8  swift           0x0000000000d88ae0
9  swift           0x0000000000d8b8d3
10 swift           0x0000000000d8734b
11 swift           0x0000000000d88b33
12 swift           0x0000000000d87bcd
13 swift           0x0000000000d87112
14 swift           0x0000000000d87014
15 swift           0x0000000000ddbf1e
16 swift           0x0000000000d6eb5c
17 swift           0x0000000000b1b473
18 swift           0x0000000000b529d0
19 swift           0x0000000000957db3
20 swift           0x00000000004a050e
21 swift           0x00000000004674de
22 libc.so.6       0x00007fe18f4c6f45 __libc_start_main + 245
23 swift           0x0000000000464be6
```
2016-11-02 11:13:58 +01:00
practicalswift
6d3b7e7c19 [swiftc (90 vs. 5180)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 90 (5180 resolved)

Stack trace:

```
0  swift           0x00000000031dc7e8
1  swift           0x00000000031dd066
2  libpthread.so.0 0x00007f7402c4e330
3  libc.so.6       0x00007f740140cc37 gsignal + 55
4  libc.so.6       0x00007f7401410028 abort + 328
5  swift           0x0000000000d7e52f
6  swift           0x0000000000d81c4f
7  swift           0x0000000000d781fc
8  swift           0x0000000000d88ae0
9  swift           0x0000000000d8b8d3
10 swift           0x0000000000d88b5f
11 swift           0x0000000000d87bcd
12 swift           0x0000000000d87112
13 swift           0x0000000000d87014
14 swift           0x0000000000ddbf1e
15 swift           0x0000000000d6eb5c
16 swift           0x0000000000b1b473
17 swift           0x0000000000b529d0
18 swift           0x0000000000957db3
19 swift           0x00000000004a050e
20 swift           0x00000000004674de
21 libc.so.6       0x00007f74013f7f45 __libc_start_main + 245
22 swift           0x0000000000464be6
```
2016-11-02 09:10:37 +01:00
practicalswift
81071c31fc [swiftc (89 vs. 5180)] Add crasher at assert(!resultReplacement->isTypeParameter() && "Can't be dependent")
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 89 (5180 resolved)

Assertion failure in [`lib/Sema/TypeCheckProtocol.cpp (line 2038)`](https://github.com/apple/swift/blob/master/lib/Sema/TypeCheckProtocol.cpp#L2038):

```
Assertion `!resultReplacement->isTypeParameter() && "Can't be dependent"' failed.

When executing: swift::Substitution getArchetypeSubstitution(swift::TypeChecker &, swift::DeclContext *, swift::ArchetypeType *, swift::Type)
```

Assertion context:

```
static Substitution getArchetypeSubstitution(TypeChecker &tc,
                                             DeclContext *dc,
                                             ArchetypeType *archetype,
                                             Type replacement) {
  Type resultReplacement = replacement;
  assert(!resultReplacement->isTypeParameter() && "Can't be dependent");
  SmallVector<ProtocolConformanceRef, 4> conformances;

  bool isError =
    replacement->hasError() || replacement->getCanonicalType()->hasError();
  assert((archetype != nullptr || isError) &&
```
Stack trace:

```
0  swift           0x00000000031dc7e8
1  swift           0x00000000031dd066
2  libpthread.so.0 0x00007f084b84f330
3  libc.so.6       0x00007f084a00dc37 gsignal + 55
4  libc.so.6       0x00007f084a011028 abort + 328
5  libc.so.6       0x00007f084a006bf6
6  libc.so.6       0x00007f084a006ca2
7  swift           0x0000000000c0841e
8  swift           0x0000000000c068f2
9  swift           0x0000000000c003e8
10 swift           0x0000000000bfc53a
11 swift           0x0000000000df2293
12 swift           0x0000000000df21d8
13 swift           0x0000000000c25b52
14 swift           0x0000000000c309bc
15 swift           0x0000000000c2f89e
16 swift           0x0000000000c27171
17 swift           0x0000000000c26e6d
18 swift           0x0000000000c27f88
19 swift           0x0000000000c28a32
20 swift           0x0000000000c27e7f
21 swift           0x0000000000c26615
22 swift           0x0000000000bcf9d6
23 swift           0x0000000000bc19f6
24 swift           0x0000000000bcaa0b
25 swift           0x0000000000bc1976
26 swift           0x0000000000bcab8b
27 swift           0x0000000000bc1986
28 swift           0x0000000000bcbb0b
29 swift           0x0000000000bc19a6
30 swift           0x0000000000bc17e6
31 swift           0x0000000000c342ff
32 swift           0x0000000000957dd6
33 swift           0x00000000004a050e
34 swift           0x00000000004674de
35 libc.so.6       0x00007f0849ff8f45 __libc_start_main + 245
36 swift           0x0000000000464be6
```
2016-11-02 07:50:36 +01:00
practicalswift
941bdec6d5 [swiftc (88 vs. 5180)] Add crasher: UNREACHABLE executed at swift/include/swift/AST/CanTypeVisitor.h:41
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 88 (5180 resolved)

Stack trace:

```
0  swift           0x00000000031da6c8
1  swift           0x00000000031daf46
2  libpthread.so.0 0x00007ff86e2b5330
3  libc.so.6       0x00007ff86ca73c37 gsignal + 55
4  libc.so.6       0x00007ff86ca77028 abort + 328
5  swift           0x000000000318311d
6  swift           0x0000000000c74998
7  swift           0x0000000000c73156
8  swift           0x0000000000c72bfe
9  swift           0x0000000000c6fda2
10 swift           0x0000000000c6e237
11 swift           0x0000000000c69d0f
12 swift           0x0000000000c5a9a6
13 swift           0x0000000000c60e90
14 swift           0x0000000000ba991f
15 swift           0x0000000000bac3be
16 swift           0x0000000000bafe77
17 swift           0x0000000000c2099d
18 swift           0x0000000000c202bc
19 swift           0x0000000000c1f455
20 swift           0x0000000000c1e7a3
21 swift           0x0000000000c1e5f7
22 swift           0x0000000000c1f1fc
23 swift           0x0000000000c32e18
24 swift           0x0000000000c3398b
25 swift           0x0000000000957a26
26 swift           0x00000000004a050e
27 swift           0x00000000004674de
28 libc.so.6       0x00007ff86ca5ef45 __libc_start_main + 245
29 swift           0x0000000000464be6
```
2016-11-01 22:29:59 +01:00
Max Moiseev
e51af7eb00 Merge branch 'master' into new-integer-protocols 2016-11-01 11:28:12 -07:00
practicalswift
54e11fbe7a [swiftc (87 vs. 5180)] Add crasher: UNREACHABLE executed at swift/lib/AST/Module.cpp:614
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 87 (5180 resolved)

Stack trace:

```
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28456-unreachable-executed-at-swift-lib-ast-module-cpp-614.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28456-unreachable-executed-at-swift-lib-ast-module-cpp-614-10867a.o
1.	While type-checking 'a' at validation-test/compiler_crashers/28456-unreachable-executed-at-swift-lib-ast-module-cpp-614.swift:9:1
2.	While resolving type e at [validation-test/compiler_crashers/28456-unreachable-executed-at-swift-lib-ast-module-cpp-614.swift:11:5 - line:11:5] RangeText="e"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-11-01 18:26:07 +01:00
practicalswift
0a25e30828 [swiftc (86 vs. 5180)] Add crasher at assert((!type->hasTypeParameter() || type->hasError()) && "not fully substituted")
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 86 (5180 resolved)

Assertion failure in [`lib/AST/GenericEnvironment.cpp (line 69)`](https://github.com/apple/swift/blob/master/lib/AST/GenericEnvironment.cpp#L69):

```
Assertion `(!type->hasTypeParameter() || type->hasError()) && "not fully substituted"' failed.

When executing: swift::Type swift::GenericEnvironment::mapTypeIntoContext(swift::ModuleDecl *, swift::Type) const
```

Assertion context:

```
}

Type GenericEnvironment::mapTypeIntoContext(ModuleDecl *M, Type type) const {
  type = type.subst(M, InterfaceToArchetypeMap, SubstFlags::AllowLoweredTypes);
  assert((!type->hasTypeParameter() || type->hasError()) &&
         "not fully substituted");
  return type;
}

Type GenericEnvironment::mapTypeIntoContext(GenericTypeParamType *type) const {
  auto canTy = type->getCanonicalType();
```
Stack trace:

```
swift: /path/to/swift/lib/AST/GenericEnvironment.cpp:69: swift::Type swift::GenericEnvironment::mapTypeIntoContext(swift::ModuleDecl *, swift::Type) const: Assertion `(!type->hasTypeParameter() || type->hasError()) && "not fully substituted"' failed.
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28455-type-hastypeparameter-type-haserror-not-fully-substituted-failed.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28455-type-hastypeparameter-type-haserror-not-fully-substituted-failed-376906.o
1.	While type-checking 'A' at validation-test/compiler_crashers/28455-type-hastypeparameter-type-haserror-not-fully-substituted-failed.swift:10:1
2.	While type-checking expression at [validation-test/compiler_crashers/28455-type-hastypeparameter-type-haserror-not-fully-substituted-failed.swift:10:25 - line:10:25] RangeText="e"
3.	While type-checking 'f' at validation-test/compiler_crashers/28455-type-hastypeparameter-type-haserror-not-fully-substituted-failed.swift:11:1
4.	While resolving type B at [validation-test/compiler_crashers/28455-type-hastypeparameter-type-haserror-not-fully-substituted-failed.swift:11:13 - line:11:13] RangeText="B"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-11-01 08:52:30 +01:00
Doug Gregor
852cda6c75 [Conformance checking] Factor requirement environment into its own type.
Rather than computing the requirement environment as a tuple of
(generic signature, generic environment, substitution map),
encapsulate the result in a new RequirementEnvironment
class. Moreover, create a RequirementEnvironment once and re-use it
when matching each of the witnesses, because the environment itself
doesn't change---only the substitutions do. This saves us some work
when there are multiple potential witnesses (which is common).
2016-10-31 14:11:58 -07:00
Max Moiseev
76e0a99a37 Merge branch 'master' into new-integer-protocols 2016-10-31 09:29:19 -07:00
practicalswift
96669b4c3e [swiftc (86 vs. 5179)] Add crasher at assert(hasVal)
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 86 (5179 resolved)

Assertion failure in `llvm/include/llvm/ADT/Optional.h (line 138)`:

```
Assertion `hasVal' failed.

When executing: T &&llvm::Optional<swift::constraints::SelectedOverload>::operator*() && [T = swift::constraints::SelectedOverload]
```

Assertion context:

```
    return hasValue() ? getValue() : std::forward<U>(value);
  }

#if LLVM_HAS_RVALUE_REFERENCE_THIS
  T&& getValue() && { assert(hasVal); return std::move(*getPointer()); }
  T&& operator*() && { assert(hasVal); return std::move(*getPointer()); }

  template <typename U>
  T getValueOr(U &&value) && {
    return hasValue() ? std::move(getValue()) : std::forward<U>(value);
  }
```
Stack trace:

```
swift: /path/to/llvm/include/llvm/ADT/Optional.h:138: T &&llvm::Optional<swift::constraints::SelectedOverload>::operator*() && [T = swift::constraints::SelectedOverload]: Assertion `hasVal' failed.
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28454-hasval-failed.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28454-hasval-failed-f00cda.o
1.	While type-checking expression at [validation-test/compiler_crashers/28454-hasval-failed.swift:10:1 - line:10:4] RangeText=".A[]"
2.	While type-checking expression at [validation-test/compiler_crashers/28454-hasval-failed.swift:10:1 - line:10:4] RangeText=".A[]"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-10-31 16:34:48 +01:00
practicalswift
2cfa124c95 [swiftc (85 vs. 5179)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 85 (5179 resolved)

Assertion failure in [`lib/AST/GenericEnvironment.cpp (line 77)`](https://github.com/apple/swift/blob/master/lib/AST/GenericEnvironment.cpp#L77):

```
Assertion `found != InterfaceToArchetypeMap.end() && "missing generic parameter"' failed.

When executing: swift::Type swift::GenericEnvironment::mapTypeIntoContext(swift::GenericTypeParamType *) const
```

Assertion context:

```

Type GenericEnvironment::mapTypeIntoContext(GenericTypeParamType *type) const {
  auto canTy = type->getCanonicalType();
  auto found = InterfaceToArchetypeMap.find(canTy.getPointer());
  assert(found != InterfaceToArchetypeMap.end() &&
         "missing generic parameter");
  return found->second;
}

GenericTypeParamType *GenericEnvironment::getSugaredType(
    GenericTypeParamType *type) const {
```
Stack trace:

```
swift: /path/to/swift/lib/AST/GenericEnvironment.cpp:77: swift::Type swift::GenericEnvironment::mapTypeIntoContext(swift::GenericTypeParamType *) const: Assertion `found != InterfaceToArchetypeMap.end() && "missing generic parameter"' failed.
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28453-found-interfacetoarchetypemap-end-missing-generic-parameter-failed.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28453-found-interfacetoarchetypemap-end-missing-generic-parameter-failed-d2922d.o
1.	While type-checking 'a' at validation-test/compiler_crashers/28453-found-interfacetoarchetypemap-end-missing-generic-parameter-failed.swift:10:1
2.	While type-checking 'e' at validation-test/compiler_crashers/28453-found-interfacetoarchetypemap-end-missing-generic-parameter-failed.swift:11:1
3.	While type-checking 'b' at validation-test/compiler_crashers/28453-found-interfacetoarchetypemap-end-missing-generic-parameter-failed.swift:14:1
4.	While resolving type A at [validation-test/compiler_crashers/28453-found-interfacetoarchetypemap-end-missing-generic-parameter-failed.swift:14:8 - line:14:8] RangeText="A"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-10-31 14:43:32 +01:00
practicalswift
a4673d21ee [swiftc (84 vs. 5179)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 84 (5179 resolved)

Assertion failure in [`include/swift/AST/Decl.h (line 4613)`](https://github.com/apple/swift/blob/master/include/swift/AST/Decl.h#L4613):

```
Assertion `!this->GenericEnv && "already have generic context?"' failed.

When executing: void swift::AbstractFunctionDecl::setGenericEnvironment(swift::GenericEnvironment *)
```

Assertion context:

```
  /// Retrieve the generic context for this function.
  GenericEnvironment *getGenericEnvironment() const { return GenericEnv; }

  /// Set the generic context of this function.
  void setGenericEnvironment(GenericEnvironment *GenericEnv) {
    assert(!this->GenericEnv && "already have generic context?");
    this->GenericEnv = GenericEnv;
  }

  // Expose our import as member status
  bool isImportAsMember() const { return IAMStatus.isImportAsMember(); }
```
Stack trace:

```
swift: /path/to/swift/include/swift/AST/Decl.h:4613: void swift::AbstractFunctionDecl::setGenericEnvironment(swift::GenericEnvironment *): Assertion `!this->GenericEnv && "already have generic context?"' failed.
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28452-this-genericenv-already-have-generic-context-failed.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28452-this-genericenv-already-have-generic-context-failed-1a320e.o
1.	While type-checking 'C' at validation-test/compiler_crashers/28452-this-genericenv-already-have-generic-context-failed.swift:10:1
2.	While resolving type F at [validation-test/compiler_crashers/28452-this-genericenv-already-have-generic-context-failed.swift:15:18 - line:15:18] RangeText="F"
3.	While type-checking 'g' at validation-test/compiler_crashers/28452-this-genericenv-already-have-generic-context-failed.swift:15:20
4.	While type-checking 'g' at validation-test/compiler_crashers/28452-this-genericenv-already-have-generic-context-failed.swift:15:1
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-10-31 13:20:34 +01:00
practicalswift
88dfb4201d [swiftc (83 vs. 5179)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 83 (5179 resolved)

Assertion failure in [`lib/AST/Module.cpp (line 596)`](https://github.com/apple/swift/blob/master/lib/AST/Module.cpp#L596):

```
Assertion `boundGeneric->getGenericArgs().size() == genericSig->getInnermostGenericParams().size()' failed.

When executing: ArrayRef<swift::Substitution> swift::TypeBase::gatherAllSubstitutions(Module *, swift::LazyResolver *, swift::DeclContext *)
```

Assertion context:

```
    if (auto boundGeneric = dyn_cast<BoundGenericType>(parent)) {
      auto genericSig = parentDC->getGenericSignatureOfContext();
      unsigned index = 0;

      assert(boundGeneric->getGenericArgs().size() ==
             genericSig->getInnermostGenericParams().size());

      for (Type arg : boundGeneric->getGenericArgs()) {
        auto paramTy = genericSig->getInnermostGenericParams()[index++];
        substitutions[paramTy->getCanonicalType().getPointer()] = arg;
      }
```
Stack trace:

```
swift: /path/to/swift/lib/AST/Module.cpp:596: ArrayRef<swift::Substitution> swift::TypeBase::gatherAllSubstitutions(Module *, swift::LazyResolver *, swift::DeclContext *): Assertion `boundGeneric->getGenericArgs().size() == genericSig->getInnermostGenericParams().size()' failed.
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28451-boundgeneric-getgenericargs-size-genericsig-getinnermostgenericparams-size-failed.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28451-boundgeneric-getgenericargs-size-genericsig-getinnermostgenericparams-size-failed-711855.o
1.	While type-checking expression at [validation-test/compiler_crashers/28451-boundgeneric-getgenericargs-size-genericsig-getinnermostgenericparams-size-failed.swift:10:1 - line:10:46] RangeText="{protocol A{class B{}struct Q<f,g where B:T>:A"
2.	While type-checking 'A' at validation-test/compiler_crashers/28451-boundgeneric-getgenericargs-size-genericsig-getinnermostgenericparams-size-failed.swift:10:2
3.	While resolving type B at [validation-test/compiler_crashers/28451-boundgeneric-getgenericargs-size-genericsig-getinnermostgenericparams-size-failed.swift:10:41 - line:10:41] RangeText="B"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-10-31 12:41:22 +01:00
practicalswift
5fa277212a [swiftc (82 vs. 5179)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 82 (5179 resolved)

Assertion failure in [`include/swift/AST/Decl.h (line 2375)`](https://github.com/apple/swift/blob/master/include/swift/AST/Decl.h#L2375):

```
Assertion `!UnderlyingTy.getType().isNull() && "getting invalid underlying type"' failed.

When executing: swift::Type swift::TypeAliasDecl::getUnderlyingType() const
```

Assertion context:

```

  /// getUnderlyingType - Returns the underlying type, which is
  /// assumed to have been set.
  Type getUnderlyingType() const {
    assert(!UnderlyingTy.getType().isNull() &&
           "getting invalid underlying type");
    return UnderlyingTy.getType();
  }

  /// computeType - Compute the type (and declared type) of this type alias;
  /// can only be called after the alias type has been resolved.
```
Stack trace:

```
swift: /path/to/swift/include/swift/AST/Decl.h:2375: swift::Type swift::TypeAliasDecl::getUnderlyingType() const: Assertion `!UnderlyingTy.getType().isNull() && "getting invalid underlying type"' failed.
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28450-underlyingty-gettype-isnull-getting-invalid-underlying-type-failed.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28450-underlyingty-gettype-isnull-getting-invalid-underlying-type-failed-770015.o
1.	While type-checking 'B' at validation-test/compiler_crashers/28450-underlyingty-gettype-isnull-getting-invalid-underlying-type-failed.swift:10:1
2.	While type-checking 'f' at validation-test/compiler_crashers/28450-underlyingty-gettype-isnull-getting-invalid-underlying-type-failed.swift:11:1
3.	While resolving type d at [validation-test/compiler_crashers/28450-underlyingty-gettype-isnull-getting-invalid-underlying-type-failed.swift:11:13 - line:11:13] RangeText="d"
4.	While type-checking 'd' at validation-test/compiler_crashers/28450-underlyingty-gettype-isnull-getting-invalid-underlying-type-failed.swift:11:15
5.	While type-checking expression at [validation-test/compiler_crashers/28450-underlyingty-gettype-isnull-getting-invalid-underlying-type-failed.swift:12:7 - line:12:7] RangeText="c"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-10-31 10:12:08 +01:00
practicalswift
3e36f8f771 [swiftc (81 vs. 5179)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 81 (5179 resolved)

Assertion failure in [`lib/Sema/ConstraintGraph.cpp (line 50)`](https://github.com/apple/swift/blob/master/lib/Sema/ConstraintGraph.cpp#L50):

```
Assertion `impl.getGraphIndex() < TypeVariables.size() && "Out-of-bounds index"' failed.

When executing: std::pair<ConstraintGraphNode &, unsigned int> swift::constraints::ConstraintGraph::lookupNode(swift::TypeVariableType *)
```

Assertion context:

```
std::pair<ConstraintGraphNode &, unsigned>
ConstraintGraph::lookupNode(TypeVariableType *typeVar) {
  // Check whether we've already created a node for this type variable.
  auto &impl = typeVar->getImpl();
  if (auto nodePtr = impl.getGraphNode()) {
    assert(impl.getGraphIndex() < TypeVariables.size() && "Out-of-bounds index");
    assert(TypeVariables[impl.getGraphIndex()] == typeVar &&
           "Type variable mismatch");
    return { *nodePtr, impl.getGraphIndex() };
  }

```
Stack trace:

```
swift: /path/to/swift/lib/Sema/ConstraintGraph.cpp:50: std::pair<ConstraintGraphNode &, unsigned int> swift::constraints::ConstraintGraph::lookupNode(swift::TypeVariableType *): Assertion `impl.getGraphIndex() < TypeVariables.size() && "Out-of-bounds index"' failed.
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28449-impl-getgraphindex-typevariables-size-out-of-bounds-index-failed.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28449-impl-getgraphindex-typevariables-size-out-of-bounds-index-failed-6fc8cd.o
1.	While type-checking expression at [validation-test/compiler_crashers/28449-impl-getgraphindex-typevariables-size-out-of-bounds-index-failed.swift:10:7 - line:10:21] RangeText=".E={return $0 c"
2.	While type-checking expression at [validation-test/compiler_crashers/28449-impl-getgraphindex-typevariables-size-out-of-bounds-index-failed.swift:10:7 - line:10:21] RangeText=".E={return $0 c"
3.	While type-checking expression at [validation-test/compiler_crashers/28449-impl-getgraphindex-typevariables-size-out-of-bounds-index-failed.swift:10:18 - line:10:18] RangeText="$"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-10-31 09:04:59 +01:00
practicalswift
96cda58a04 [swiftc (80 vs. 5179)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 80 (5179 resolved)

Assertion failure in [`lib/AST/ArchetypeBuilder.cpp (line 1693)`](https://github.com/apple/swift/blob/master/lib/AST/ArchetypeBuilder.cpp#L1693):

```
Assertion `dist > 0 && "nested type should have matched associated type"' failed.

When executing: swift::Identifier typoCorrectNestedType(ArchetypeBuilder::PotentialArchetype *)
```

Assertion context:

```
        continue;

      unsigned dist = name.edit_distance(assocType->getName().str(),
                                         /*allowReplacements=*/true,
                                         maxScore);
      assert(dist > 0 && "nested type should have matched associated type");
      if (bestEditDistance == 0 || dist == bestEditDistance) {
        bestEditDistance = dist;
        maxScore = bestEditDistance;
        bestMatches.push_back(assocType->getName());
      } else if (dist < bestEditDistance) {
```
Stack trace:

```
swift: /path/to/swift/lib/AST/ArchetypeBuilder.cpp:1693: swift::Identifier typoCorrectNestedType(ArchetypeBuilder::PotentialArchetype *): Assertion `dist > 0 && "nested type should have matched associated type"' failed.
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28448-dist-nested-type-should-have-matched-associated-type-failed.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28448-dist-nested-type-should-have-matched-associated-type-failed-6ab04f.o
1.	While type-checking extension of A at validation-test/compiler_crashers/28448-dist-nested-type-should-have-matched-associated-type-failed.swift:10:1
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-10-31 08:06:05 +01:00
practicalswift
dda9d2f000 [swiftc (79 vs. 5179)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 79 (5179 resolved)

Assertion failure in [`lib/AST/Type.cpp (line 1280)`](https://github.com/apple/swift/blob/master/lib/AST/Type.cpp#L1280):

```
Assertion `Result && "Case not implemented!"' failed.

When executing: swift::CanType swift::TypeBase::getCanonicalType()
```

Assertion context:

```
  }
  }

  // Cache the canonical type for future queries.
  assert(Result && "Case not implemented!");
  CanonicalType = Result;
  return CanType(Result);
}

```
Stack trace:

```
swift: /path/to/swift/lib/AST/Type.cpp:1280: swift::CanType swift::TypeBase::getCanonicalType(): Assertion `Result && "Case not implemented!"' failed.
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28447-result-case-not-implemented-failed.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28447-result-case-not-implemented-failed-778155.o
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-10-30 21:49:35 +01:00
practicalswift
c600b48768 [swiftc (78 vs. 5179)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 78 (5179 resolved)

Assertion failure in [`include/swift/AST/DiagnosticEngine.h (line 614)`](https://github.com/apple/swift/blob/master/include/swift/AST/DiagnosticEngine.h#L614):

```
Assertion `!ActiveDiagnostic && "Already have an active diagnostic"' failed.

When executing: swift::InFlightDiagnostic swift::DiagnosticEngine::diagnose(swift::SourceLoc, Diag<ArgTypes...>, typename detail::PassArgument<ArgTypes>::type...) [ArgTypes = <swift::Type>]
```

Assertion context:

```
    /// the types expected by the diagnostic \p ID.
    template<typename ...ArgTypes>
    InFlightDiagnostic
    diagnose(SourceLoc Loc, Diag<ArgTypes...> ID,
             typename detail::PassArgument<ArgTypes>::type... Args) {
      assert(!ActiveDiagnostic && "Already have an active diagnostic");
      ActiveDiagnostic = Diagnostic(ID, std::move(Args)...);
      ActiveDiagnostic->setLoc(Loc);
      return InFlightDiagnostic(*this);
    }

```
Stack trace:

```
swift: /path/to/swift/include/swift/AST/DiagnosticEngine.h:614: swift::InFlightDiagnostic swift::DiagnosticEngine::diagnose(swift::SourceLoc, Diag<ArgTypes...>, typename detail::PassArgument<ArgTypes>::type...) [ArgTypes = <swift::Type>]: Assertion `!ActiveDiagnostic && "Already have an active diagnostic"' failed.
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28446-activediagnostic-already-have-an-active-diagnostic-failed.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28446-activediagnostic-already-have-an-active-diagnostic-failed-9fd888.o
1.	While type-checking 'A' at validation-test/compiler_crashers/28446-activediagnostic-already-have-an-active-diagnostic-failed.swift:10:1
2.	While type-checking expression at [validation-test/compiler_crashers/28446-activediagnostic-already-have-an-active-diagnostic-failed.swift:10:15 - line:10:15] RangeText="0"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-10-30 20:58:52 +01:00
practicalswift
70d9a14229 [swiftc (77 vs. 5179)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 77 (5179 resolved)

Assertion failure in [`lib/Sema/TypeCheckDecl.cpp (line 7155)`](https://github.com/apple/swift/blob/master/lib/Sema/TypeCheckDecl.cpp#L7155):

```
Assertion `gp->getOuterParameters() == proto->getDeclContext()->getGenericParamsOfContext()' failed.

When executing: void swift::TypeChecker::validateDecl(swift::ValueDecl *, bool)
```

Assertion context:

```
    (void) gp;

    validateGenericTypeSignature(proto);

    assert(gp->getOuterParameters() ==
           proto->getDeclContext()->getGenericParamsOfContext());

    // Record inherited protocols.
    resolveInheritedProtocols(proto);

    validateAttributes(*this, D);
```
Stack trace:

```
swift: /path/to/swift/lib/Sema/TypeCheckDecl.cpp:7155: void swift::TypeChecker::validateDecl(swift::ValueDecl *, bool): Assertion `gp->getOuterParameters() == proto->getDeclContext()->getGenericParamsOfContext()' failed.
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28445-gp-getouterparameters-proto-getdeclcontext-getgenericparamsofcontext-failed.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28445-gp-getouterparameters-proto-getdeclcontext-getgenericparamsofcontext-failed-cb77c4.o
1.	While type-checking 'A' at validation-test/compiler_crashers/28445-gp-getouterparameters-proto-getdeclcontext-getgenericparamsofcontext-failed.swift:10:1
2.	While type-checking expression at [validation-test/compiler_crashers/28445-gp-getouterparameters-proto-getdeclcontext-getgenericparamsofcontext-failed.swift:10:16 - line:10:17] RangeText="<c"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-10-30 20:01:48 +01:00
practicalswift
33f7965acf [swiftc (76 vs. 5179)] Add crasher in ?
Add test case for crash triggered in `?`.

Current number of unresolved compiler crashers: 76 (5179 resolved)

Assertion failure in [`lib/AST/ProtocolConformance.cpp (line 271)`](https://github.com/apple/swift/blob/master/lib/AST/ProtocolConformance.cpp#L271):

```
Assertion `resolver && "Unable to resolve type witness"' failed.

When executing: std::pair<const Substitution &, TypeDecl *> swift::NormalProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl *, swift::LazyResolver *) const
```

Assertion context:

```
  if (Resolver)
    resolveLazyInfo();

  auto known = TypeWitnesses.find(assocType);
  if (known == TypeWitnesses.end()) {
    assert(resolver && "Unable to resolve type witness");
    resolver->resolveTypeWitness(this, assocType);
    known = TypeWitnesses.find(assocType);
    assert(known != TypeWitnesses.end() && "Didn't resolve witness?");
  }

```
Stack trace:

```
swift: /path/to/swift/lib/AST/ProtocolConformance.cpp:271: std::pair<const Substitution &, TypeDecl *> swift::NormalProtocolConformance::getTypeWitnessSubstAndDecl(swift::AssociatedTypeDecl *, swift::LazyResolver *) const: Assertion `resolver && "Unable to resolve type witness"' failed.
Stack dump:
0.	Program arguments: /path/to/swift/bin/swift -frontend -c -primary-file validation-test/compiler_crashers/28444-resolver-unable-to-resolve-type-witness-failed.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -module-name main -o /tmp/28444-resolver-unable-to-resolve-type-witness-failed-1c716b.o
1.	While type-checking 'd' at validation-test/compiler_crashers/28444-resolver-unable-to-resolve-type-witness-failed.swift:10:1
2.	While type-checking expression at [validation-test/compiler_crashers/28444-resolver-unable-to-resolve-type-witness-failed.swift:10:19 - line:10:19] RangeText="b"
<unknown>:0: error: unable to execute command: Aborted
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
```
2016-10-30 19:06:41 +01:00
Michael Gottesman
20dd563efb [semantic-arc] Update tests for qualified/unqualified ownership and SILGen emission of copy_value, destroy_value. 2016-10-29 20:11:09 -07:00
Alexis Beingessner
e8f4cb66e4 update reflection tests with new type layouts for Dictionary 2016-10-29 10:04:35 -04:00
Alexis Beingessner
76c6281fea [stdlib] Rewriting native hashed collection indices
Changes:
- Native dictionary and set indices no longer hold references to storage
- Cocoa-based dictionary and set indices no longer hold references to storage
- Removed double indirection trick from hashed collections
- Rewrote storage types to reflect simpler model
- Updated unit tests
2016-10-29 10:04:35 -04:00
practicalswift
cc852042c9 [gardening] Fix accidental trailing whitespace. 2016-10-29 10:22:58 +02:00
Max Moiseev
3d4f00091d Merge remote-tracking branch 'origin/master' into new-integer-protocols 2016-10-28 15:55:40 -07:00
swift-ci
9c4f1a5815 Merge pull request #5506 from DougGregor/fix-28145033 2016-10-27 22:17:04 -07:00
Doug Gregor
33ad7a8473 [Constraint solver] Remove erroneous constraints from the constraint graph.
When a constraint fails, we retire it... but we also need to remove it
from the constraint graph. Otherwise, we break invariants when
diagnostic generation attempts to continue simplification.

Fixes rdar://rdar28145033.
2016-10-27 21:35:14 -07:00
Pavel Yaskevich
dd01b7e184 [Diagnostics] SR-2208: Improve failure diagnostics for apply expressions 2016-10-26 14:34:05 -07:00
Doug Gregor
2ce30d32c4 Add a few more type-checker crasher addressed by the "occurs" check.
For rdar://problem/19343997, rdar://problem/19924870, and rdar://problem/20771765.
2016-10-25 23:26:07 -07:00
Doug Gregor
b295106830 [Constraint solver] Use the type representative in the "occurs" check.
When performing the occurs check, look for the *representative* of the
type variable we're about to bind, rather than the type variable
itself. Fixes rdar://problem/26845038, SR-1512, SR-1902, SR2635,
SR-2852, and SR-2766.
2016-10-25 22:37:21 -07:00
Doug Gregor
4cc41e5e64 [Constraint solver] Perform the "occurs" check properly.
We've been performing the "occurs" check when computing potential
bindings for type variables, but we weren't actually performing the
check for bindings that *must* occur. Perform the occurs check before
binding type variables, which fixes a few crashers and is far more principled.

Note that this obviates the need for tracking the type variables we've
substituted in simplifyType(), so simplify that as well.

Fixes rdar://problem/27879334 / SR-2351.
2016-10-25 13:32:06 -07:00
Max Moiseev
6935316638 Merge branch 'master' into new-integer-protocols 2016-10-24 14:54:21 -07:00
swift-ci
5877db3b6b Merge pull request #5099 from rintaro/rangle-location 2016-10-24 00:16:42 -07:00
Doug Gregor
d2cb83b4c7 [Constraint solver] Make checked cast constraint generation lazy.
Fixes rdar://problem/27148148.
2016-10-22 22:57:25 -07:00
Max Moiseev
8912dc09a8 Merge branch 'master' into new-integer-protocols 2016-10-20 13:55:03 -07:00