Commit 2b8c9b1
committed
Auto merge of #24478 - alexcrichton:issue-24313, r=aturon
Inspecting the current thread's info may not always work due to the TLS value
having been destroyed (or is actively being destroyed). The code for printing
a panic message assumed, however, that it could acquire the thread's name
through this method.
Instead this commit propagates the `Option` outwards to allow the
`std::panicking` module to handle the case where the current thread isn't
present.
While it solves the immediate issue of #24313, there is still another underlying
issue of panicking destructors in thread locals will abort the process.
Closes #24313File tree
6 files changed
+55
-31
lines changed- src
- libstd
- sys
- common
- unix
- thread
- test/run-pass
6 files changed
+55
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | | - | |
31 | | - | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | | - | |
| 40 | + | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
45 | 44 | | |
46 | | - | |
| 45 | + | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | | - | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
78 | 77 | | |
79 | 78 | | |
80 | 79 | | |
81 | | - | |
82 | 80 | | |
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
86 | | - | |
87 | 84 | | |
88 | 85 | | |
89 | 86 | | |
| |||
297 | 294 | | |
298 | 295 | | |
299 | 296 | | |
| 297 | + | |
300 | 298 | | |
301 | 299 | | |
302 | 300 | | |
303 | 301 | | |
304 | 302 | | |
305 | 303 | | |
306 | 304 | | |
307 | | - | |
308 | | - | |
309 | 305 | | |
310 | 306 | | |
311 | 307 | | |
312 | 308 | | |
313 | 309 | | |
314 | 310 | | |
315 | 311 | | |
316 | | - | |
317 | 312 | | |
318 | 313 | | |
319 | 314 | | |
320 | 315 | | |
321 | | - | |
322 | 316 | | |
323 | | - | |
324 | 317 | | |
325 | 318 | | |
326 | 319 | | |
327 | 320 | | |
328 | 321 | | |
329 | | - | |
330 | 322 | | |
331 | 323 | | |
332 | 324 | | |
| |||
422 | 414 | | |
423 | 415 | | |
424 | 416 | | |
425 | | - | |
426 | | - | |
427 | 417 | | |
428 | 418 | | |
429 | 419 | | |
| |||
435 | 425 | | |
436 | 426 | | |
437 | 427 | | |
| 428 | + | |
438 | 429 | | |
439 | 430 | | |
440 | 431 | | |
| |||
444 | 435 | | |
445 | 436 | | |
446 | 437 | | |
447 | | - | |
448 | | - | |
449 | 438 | | |
450 | 439 | | |
451 | 440 | | |
452 | | - | |
453 | 441 | | |
454 | 442 | | |
455 | 443 | | |
456 | | - | |
457 | 444 | | |
458 | 445 | | |
459 | 446 | | |
| |||
464 | 451 | | |
465 | 452 | | |
466 | 453 | | |
467 | | - | |
468 | 454 | | |
469 | 455 | | |
470 | 456 | | |
| |||
489 | 475 | | |
490 | 476 | | |
491 | 477 | | |
492 | | - | |
| 478 | + | |
493 | 479 | | |
494 | 480 | | |
495 | 481 | | |
496 | 482 | | |
497 | 483 | | |
498 | | - | |
499 | | - | |
500 | 484 | | |
501 | 485 | | |
502 | 486 | | |
| |||
505 | 489 | | |
506 | 490 | | |
507 | 491 | | |
508 | | - | |
| 492 | + | |
509 | 493 | | |
510 | 494 | | |
511 | 495 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
407 | 407 | | |
408 | 408 | | |
409 | 409 | | |
410 | | - | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
411 | 413 | | |
412 | 414 | | |
413 | 415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
0 commit comments