Commit f5a3039
authored
Rollup merge of rust-lang#110783 - dtolnay:safeprint, r=petrochenkov
Fix ICE on --print=... i/o errors
`rustc --print=cfg > /dev/full`
**Before:** ICE (see below)
**After:** exits quietly with code 1.
```console
thread 'rustc' panicked at 'failed printing to stdout: No space left on device (os error 28)', library/std/src/io/stdio.rs:1019:9
stack backtrace:
0: 0x7ffa84d68f33 - std::backtrace_rs::backtrace::libunwind::trace::h527d8d64d53ade2d
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x7ffa84d68f33 - std::backtrace_rs::backtrace::trace_unsynchronized::hfb55b01517dd6379
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x7ffa84d68f33 - std::sys_common::backtrace::_print_fmt::hd134e914eea0bd97
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/sys_common/backtrace.rs:65:5
3: 0x7ffa84d68f33 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h1480db11ec399d77
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/sys_common/backtrace.rs:44:22
4: 0x7ffa84dc9d4f - core::fmt::write::h67ec4c4171c92b26
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/core/src/fmt/mod.rs:1247:17
5: 0x7ffa84d5bed1 - std::io::Write::write_fmt::h3b12aef0fff2463b
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/io/mod.rs:1712:15
6: 0x7ffa84d68d45 - std::sys_common::backtrace::_print::h584400135abdbd51
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/sys_common/backtrace.rs:47:5
7: 0x7ffa84d68d45 - std::sys_common::backtrace::print::hce41d3c8bd91096b
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/sys_common/backtrace.rs:34:9
8: 0x7ffa84d6b84f - std::panicking::default_hook::{{closure}}::h2043b657a3791225
9: 0x7ffa84d6b507 - std::panicking::default_hook::h99252b8d3dd5719c
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/panicking.rs:293:9
10: 0x7ffa87fdf915 - <rustc_driver_impl[d30cd2737d9d343a]::DEFAULT_HOOK::{closure#0}::{closure#0} as core[cc19a662f3570270]::ops::function::FnOnce<(&core[cc19a662f3570270]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
11: 0x7ffa84d6c005 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h222a2b674b9f4762
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/alloc/src/boxed.rs:1976:9
12: 0x7ffa84d6c005 - std::panicking::rust_panic_with_hook::h7f49b36bf7f8ff77
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/panicking.rs:704:13
13: 0x7ffa84d6bd73 - std::panicking::begin_panic_handler::{{closure}}::haa23a7352589e31e
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/panicking.rs:595:13
14: 0x7ffa84d69376 - std::sys_common::backtrace::__rust_end_short_backtrace::h3d0cf6e3c96e3fe9
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/sys_common/backtrace.rs:150:18
15: 0x7ffa84d6ba72 - rust_begin_unwind
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/panicking.rs:584:5
16: 0x7ffa84dc5fe3 - core::panicking::panic_fmt::hf4b4ea11e3fdb110
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/core/src/panicking.rs:67:14
17: 0x7ffa84d5aa07 - std::io::stdio::print_to::h55760b9ede306280
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/io/stdio.rs:1019:9
18: 0x7ffa84d5aa07 - std::io::stdio::_print::h93deb6099db33eab
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/io/stdio.rs:1095:5
19: 0x7ffa871e163b - rustc_driver_impl[d30cd2737d9d343a]::print_crate_info
20: 0x7ffa87fb8e01 - rustc_span[9551eaa044f53f4f]::set_source_map::<(), rustc_interface[c2b70c9b1dae0906]::interface::run_compiler<(), rustc_driver_impl[d30cd2737d9d343a]::run_compiler::{closure#0}>::{closure#0}::{closure#0}>
21: 0x7ffa87fb6d59 - std[71a32ca0600a6a04]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[c2b70c9b1dae0906]::util::run_in_thread_pool_with_globals<rustc_interface[c2b70c9b1dae0906]::interface::run_compiler<(), rustc_driver_impl[d30cd2737d9d343a]::run_compiler::{closure#0}>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>
22: 0x7ffa87fe25b4 - std[71a32ca0600a6a04]::panicking::try::<(), core[cc19a662f3570270]::panic::unwind_safe::AssertUnwindSafe<<std[71a32ca0600a6a04]::thread::Builder>::spawn_unchecked_<rustc_interface[c2b70c9b1dae0906]::util::run_in_thread_pool_with_globals<rustc_interface[c2b70c9b1dae0906]::interface::run_compiler<(), rustc_driver_impl[d30cd2737d9d343a]::run_compiler::{closure#0}>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1}::{closure#0}>>
23: 0x7ffa87fb0cf1 - <<std[71a32ca0600a6a04]::thread::Builder>::spawn_unchecked_<rustc_interface[c2b70c9b1dae0906]::util::run_in_thread_pool_with_globals<rustc_interface[c2b70c9b1dae0906]::interface::run_compiler<(), rustc_driver_impl[d30cd2737d9d343a]::run_compiler::{closure#0}>::{closure#0}, ()>::{closure#0}::{closure#0}, ()>::{closure#1} as core[cc19a662f3570270]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
24: 0x7ffa84d763e5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hf15d802f31f86225
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/alloc/src/boxed.rs:1962:9
25: 0x7ffa84d763e5 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hac564355b46c52d6
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/alloc/src/boxed.rs:1962:9
26: 0x7ffa84d763e5 - std::sys::unix::thread::Thread::new::thread_start::h86fb3aedb7811f07
at /rustc/7f94b314cead7059a71a265a8b64905ef2511796/library/std/src/sys/unix/thread.rs:108:17
27: 0x7ffa84a94b43 - start_thread
at ./nptl/pthread_create.c:442:8
28: 0x7ffa84b26a00 - clone3
at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
29: 0x0 - <unknown>
error: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md
note: rustc 1.71.0-nightly (7f94b31 2023-04-23) running on x86_64-unknown-linux-gnu
query stack during panic:
end of query stack
```2 files changed
+68
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
61 | 67 | | |
62 | 68 | | |
| 69 | + | |
| 70 | + | |
63 | 71 | | |
64 | 72 | | |
65 | 73 | | |
| |||
511 | 519 | | |
512 | 520 | | |
513 | 521 | | |
514 | | - | |
| 522 | + | |
515 | 523 | | |
516 | 524 | | |
517 | 525 | | |
| |||
547 | 555 | | |
548 | 556 | | |
549 | 557 | | |
550 | | - | |
| 558 | + | |
551 | 559 | | |
552 | 560 | | |
553 | 561 | | |
| |||
601 | 609 | | |
602 | 610 | | |
603 | 611 | | |
604 | | - | |
| 612 | + | |
605 | 613 | | |
606 | 614 | | |
607 | 615 | | |
| |||
642 | 650 | | |
643 | 651 | | |
644 | 652 | | |
645 | | - | |
| 653 | + | |
646 | 654 | | |
647 | | - | |
648 | | - | |
| 655 | + | |
| 656 | + | |
649 | 657 | | |
650 | | - | |
| 658 | + | |
651 | 659 | | |
652 | 660 | | |
653 | 661 | | |
| |||
656 | 664 | | |
657 | 665 | | |
658 | 666 | | |
659 | | - | |
| 667 | + | |
660 | 668 | | |
661 | 669 | | |
662 | 670 | | |
| |||
666 | 674 | | |
667 | 675 | | |
668 | 676 | | |
669 | | - | |
| 677 | + | |
670 | 678 | | |
671 | 679 | | |
672 | 680 | | |
673 | 681 | | |
674 | 682 | | |
675 | 683 | | |
676 | | - | |
| 684 | + | |
677 | 685 | | |
678 | 686 | | |
679 | 687 | | |
| |||
707 | 715 | | |
708 | 716 | | |
709 | 717 | | |
710 | | - | |
| 718 | + | |
711 | 719 | | |
712 | 720 | | |
713 | 721 | | |
714 | 722 | | |
715 | 723 | | |
716 | | - | |
| 724 | + | |
717 | 725 | | |
718 | 726 | | |
719 | 727 | | |
| |||
733 | 741 | | |
734 | 742 | | |
735 | 743 | | |
736 | | - | |
| 744 | + | |
737 | 745 | | |
738 | 746 | | |
739 | 747 | | |
| |||
770 | 778 | | |
771 | 779 | | |
772 | 780 | | |
773 | | - | |
| 781 | + | |
774 | 782 | | |
775 | 783 | | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
781 | 789 | | |
782 | 790 | | |
783 | 791 | | |
| |||
807 | 815 | | |
808 | 816 | | |
809 | 817 | | |
810 | | - | |
| 818 | + | |
811 | 819 | | |
812 | 820 | | |
813 | 821 | | |
| |||
820 | 828 | | |
821 | 829 | | |
822 | 830 | | |
823 | | - | |
| 831 | + | |
824 | 832 | | |
825 | 833 | | |
826 | 834 | | |
| |||
832 | 840 | | |
833 | 841 | | |
834 | 842 | | |
835 | | - | |
| 843 | + | |
836 | 844 | | |
837 | 845 | | |
838 | 846 | | |
| |||
877 | 885 | | |
878 | 886 | | |
879 | 887 | | |
880 | | - | |
| 888 | + | |
881 | 889 | | |
882 | 890 | | |
883 | | - | |
884 | | - | |
| 891 | + | |
| 892 | + | |
885 | 893 | | |
886 | 894 | | |
887 | | - | |
| 895 | + | |
888 | 896 | | |
889 | 897 | | |
890 | 898 | | |
891 | 899 | | |
892 | 900 | | |
893 | 901 | | |
894 | | - | |
| 902 | + | |
895 | 903 | | |
896 | 904 | | |
897 | 905 | | |
| |||
912 | 920 | | |
913 | 921 | | |
914 | 922 | | |
915 | | - | |
| 923 | + | |
916 | 924 | | |
917 | 925 | | |
918 | | - | |
919 | | - | |
| 926 | + | |
| 927 | + | |
920 | 928 | | |
921 | 929 | | |
922 | | - | |
| 930 | + | |
923 | 931 | | |
924 | 932 | | |
925 | 933 | | |
| |||
929 | 937 | | |
930 | 938 | | |
931 | 939 | | |
932 | | - | |
| 940 | + | |
933 | 941 | | |
934 | | - | |
| 942 | + | |
935 | 943 | | |
936 | 944 | | |
937 | 945 | | |
938 | 946 | | |
939 | 947 | | |
940 | 948 | | |
941 | | - | |
| 949 | + | |
942 | 950 | | |
943 | 951 | | |
944 | | - | |
| 952 | + | |
945 | 953 | | |
946 | 954 | | |
947 | | - | |
| 955 | + | |
948 | 956 | | |
949 | 957 | | |
950 | 958 | | |
951 | | - | |
| 959 | + | |
952 | 960 | | |
953 | 961 | | |
954 | 962 | | |
| |||
996 | 1004 | | |
997 | 1005 | | |
998 | 1006 | | |
999 | | - | |
| 1007 | + | |
1000 | 1008 | | |
1001 | 1009 | | |
1002 | 1010 | | |
1003 | 1011 | | |
1004 | | - | |
| 1012 | + | |
1005 | 1013 | | |
1006 | 1014 | | |
1007 | 1015 | | |
| |||
1012 | 1020 | | |
1013 | 1021 | | |
1014 | 1022 | | |
1015 | | - | |
| 1023 | + | |
1016 | 1024 | | |
1017 | 1025 | | |
1018 | 1026 | | |
| |||
| 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 | + | |
0 commit comments