This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Commit 7da7bd6
committed
Gracefully handle assertion errors during runtime startup/teardown
assert() is used throughout the various bits and pieces involved in
druntime startup and teardown. However, the default assert handler
(throwing an AssertError) requires the GC and exception handling to
be up and running, which is not the case for failures e.g. in the
module registry code.
Of course, these assertions should never be triggered in shipped
versions of druntime. But they might be during development, and
this change ensures that a sensible error message is printed
instead of hitting an infinite recursion or a GC deadlock.1 parent 3164410 commit 7da7bd6
File tree
4 files changed
+33
-9
lines changed- src
- core
- internal
- rt
- test/exceptions
4 files changed
+33
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
416 | 416 | | |
417 | 417 | | |
418 | 418 | | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
419 | 434 | | |
420 | 435 | | |
421 | 436 | | |
| |||
434 | 449 | | |
435 | 450 | | |
436 | 451 | | |
437 | | - | |
| 452 | + | |
438 | 453 | | |
439 | 454 | | |
440 | 455 | | |
| |||
452 | 467 | | |
453 | 468 | | |
454 | 469 | | |
455 | | - | |
| 470 | + | |
456 | 471 | | |
457 | 472 | | |
458 | 473 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
| |||
23 | 28 | | |
24 | 29 | | |
25 | 30 | | |
26 | | - | |
| 31 | + | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| |||
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
43 | | - | |
| 48 | + | |
| 49 | + | |
44 | 50 | | |
45 | 51 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
180 | 181 | | |
181 | 182 | | |
182 | 183 | | |
| 184 | + | |
183 | 185 | | |
184 | 186 | | |
185 | 187 | | |
| |||
205 | 207 | | |
206 | 208 | | |
207 | 209 | | |
| 210 | + | |
208 | 211 | | |
209 | 212 | | |
210 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
0 commit comments