-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Commit 61cb1e9
Auto merge of #115746 - tgross35:unnamed-threads-panic-message, r=cuviper
Print thread ID in panic message
`panic!` does not print any identifying information for threads that are
unnamed. However, in many cases, the thread ID can be determined.
This changes the panic message from something like this:
thread '<unnamed>' panicked at src/main.rs:3:5:
explicit panic
To something like this:
thread '<unnamed>' (12345) panicked at src/main.rs:3:5:
explicit panic
Stack overflow messages are updated as well.
This change applies to both named and unnamed threads. The ID printed is
the OS integer thread ID rather than the Rust thread ID, which should
also be what debuggers print.
try-job: aarch64-apple
try-job: aarch64-gnu
try-job: dist-apple-various
try-job: dist-various-*
try-job: dist-x86_64-freebsd
try-job: dist-x86_64-illumos
try-job: dist-x86_64-netbsd
try-job: dist-x86_64-solaris
try-job: test-various
try-job: x86_64-gnu
try-job: x86_64-mingw-1
try-job: x86_64-msvc-1File tree
124 files changed
+318
-169
lines changed- library/std/src
- sys/pal
- hermit
- itron
- sgx
- teeos
- uefi
- unix
- unsupported
- wasi
- windows
- c
- xous
- thread
- src/tools
- compiletest/src
- miri/tests
- fail
- function_calls
- panic
- panic
- function_calls
- pass/panic
- rustfmt/tests/rustfmt
- tests
- run-make
- libtest-json
- libtest-junit
- rustdoc-ui
- doctest
- ui
- async-await/issues/issue-65419
- backtrace
- const-generics/generic_const_exprs
- extern
- hygiene
- intrinsics
- issues
- layout
- macros
- mir/lint
- nll
- numbers-arithmetic
- panics
- proc-macro
- process
- resolve
- test-attrs
- track-diagnostics
- treat-err-as-bug
- type/pattern_types
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
124 files changed
+318
-169
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
269 | 269 |
| |
270 | 270 |
| |
271 | 271 |
| |
272 | + | ||
272 | 273 |
| |
273 | 274 |
| |
274 | 275 |
| |
| |||
277 | 278 |
| |
278 | 279 |
| |
279 | 280 |
| |
280 | - | ||
281 | + | ||
281 | 282 |
| |
282 | 283 |
| |
283 | 284 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
118 | + | ||
119 | + | ||
120 | + | ||
121 | + | ||
118 | 122 |
| |
119 | 123 |
| |
120 | 124 |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
361 | 361 |
| |
362 | 362 |
| |
363 | 363 |
| |
364 | + | ||
365 | + | ||
366 | + | ||
367 | + | ||
364 | 368 |
| |
365 | 369 |
| |
366 | 370 |
|
Lines changed: 5 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 | - | ||
3 | + | ||
4 | 4 |
| |
5 | 5 |
| |
6 | 6 |
| |
| |||
149 | 149 |
| |
150 | 150 |
| |
151 | 151 |
| |
152 | + | ||
153 | + | ||
154 | + | ||
155 | + | ||
152 | 156 |
| |
153 | 157 |
| |
154 | 158 |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
144 | 144 |
| |
145 | 145 |
| |
146 | 146 |
| |
147 | + | ||
148 | + | ||
149 | + | ||
150 | + | ||
147 | 151 |
| |
148 | 152 |
| |
149 | 153 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
59 | + | ||
60 | + | ||
61 | + | ||
62 | + | ||
59 | 63 |
| |
60 | 64 |
| |
61 | 65 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
119 | 119 |
| |
120 | 120 |
| |
121 | 121 |
| |
122 | - | ||
122 | + | ||
123 | + | ||
123 | 124 |
| |
124 | 125 |
| |
125 | 126 |
| |
| |||
696 | 697 |
| |
697 | 698 |
| |
698 | 699 |
| |
699 | - | ||
700 | + | ||
701 | + | ||
700 | 702 |
| |
701 | 703 |
| |
702 | 704 |
| |
|
Lines changed: 56 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
398 | 398 |
| |
399 | 399 |
| |
400 | 400 |
| |
401 | + | ||
402 | + | ||
403 | + | ||
404 | + | ||
405 | + | ||
406 | + | ||
407 | + | ||
408 | + | ||
409 | + | ||
410 | + | ||
411 | + | ||
412 | + | ||
413 | + | ||
414 | + | ||
415 | + | ||
416 | + | ||
417 | + | ||
418 | + | ||
419 | + | ||
420 | + | ||
421 | + | ||
422 | + | ||
423 | + | ||
424 | + | ||
425 | + | ||
426 | + | ||
427 | + | ||
428 | + | ||
429 | + | ||
430 | + | ||
431 | + | ||
432 | + | ||
433 | + | ||
434 | + | ||
435 | + | ||
436 | + | ||
437 | + | ||
438 | + | ||
439 | + | ||
440 | + | ||
441 | + | ||
442 | + | ||
443 | + | ||
444 | + | ||
445 | + | ||
446 | + | ||
447 | + | ||
448 | + | ||
449 | + | ||
450 | + | ||
451 | + | ||
452 | + | ||
453 | + | ||
454 | + | ||
455 | + | ||
456 | + | ||
401 | 457 |
| |
402 | 458 |
| |
403 | 459 |
| |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 | + | ||
43 | + | ||
44 | + | ||
45 | + | ||
42 | 46 |
| |
43 | 47 |
| |
44 | 48 |
|
Lines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
194 | 194 |
| |
195 | 195 |
| |
196 | 196 |
| |
197 | + | ||
198 | + | ||
199 | + | ||
200 | + | ||
197 | 201 |
| |
198 | 202 |
| |
199 | 203 |
| |
|
0 commit comments