Skip to content

[Debuginfo] Use Reference DINode for references, delineate between mut/non-mut ref/ptr #136080

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

Walnut356
Copy link
Contributor

Reimplementation of this pr which adds differentiation between pointers and refs, as well as differentiation between mut/non-mut for both. with a slightly less hack-y workaround to the issue below:

C-centric debuggers (read: all 3 of our supported debuggers) consider &&u8 to be an r-value reference (no equivalent in Rust) or a completely invalid construct, I'm not sure which. In either case, it effectively reinterpret-casts it to &u8 - i.e. a reference to the bottom 8 bits of the address that points to a u8. It's questionable whether this can be solved on the debugger-end. For LLDB, since we're currently piggybacking on TypeSystemClang, this behavior isn't incorrect for its intended language (C/C++, where ref-to-ref is explicitly illegal). GDB has rust-specific handling, but I'm not super familiar with it. If ref handling isn't inextricably linked to the universal debug info processing, it could be an easy fix. If not, it seems like it'd probably be a big rework. IIRC CDB/Natvis are essentially non-issues for this, since refs are just implicitly converted to pointers for all debugging purposes.

Wrapping one of the "adjacent" refs in a fake-debuginfo-struct is necessary because, as evinced by the current behavior of raw pointer debug info, the name field that we pass to LLVMRustDIBuildPointerType is not respected in any way. As such, this patch turns all "outer" refs in ref-to-refs to the msvc-style ref$<> (with a single raw pointer member called ptr).

For example &&u8 -> ref$<&u8>, &mut &&u8 -> ref_mut$<ref$<&u8>>. A nice consequence of wrapping only the outer references is that it doesn't affect non-msvc handling of things like &str and &[u8].

The natvis script was trivial to update, and LLDB is what I'm most familiar with so those should be fine.

I did my best to keep the GDB formatter in-line with what already exists, but GDB's python API is a fair bit weaker than LLDB's so it's not perfect. If we could get a frequent GDB user to give it a spin and let me know if they'd like anything changed, that would be awesome.

Once again worth pointing out that GDB is hard-coded to format all pointers as *mut. That should be pretty trivial for them to remove, and I've written PtrTypePrinter in such a way that it shouldn't require any changes on our end once it's fixed on theirs. I tried to write a NestedRefTypePrinter but it straight up refused to work. The recognizer function wasn't even been called at any point. GDB's rust-specific C code might be bypassing the TypePrinter API for struct types? I'm not 100% sure.

Also, just like before, Box does not have any special handling and is just treated as a *mut.

@rustbot
Copy link
Collaborator

rustbot commented Jan 26, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 26, 2025
@Walnut356 Walnut356 changed the title [Debuginfo] Use Reference DINode for references, delineate between mut and const ref/ptr [Debuginfo] Use Reference DINode for references, delineate between mut/non-mut ref/ptr Jan 26, 2025
@rust-log-analyzer
Copy link
Collaborator

The job x86_64-gnu-llvm-18 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
#21 exporting to docker image format
#21 sending tarball 29.3s done
#21 DONE 37.0s
##[endgroup]
Setting extra environment values for docker:  --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-18]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Starting the server...
##[group]Configure the build
configure: processing command line
configure: 
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-18', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--enable-new-symbol-mangling']
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-18/bin/llvm-config
configure: llvm.link-shared     := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
---
failures:

---- [ui] tests/ui/abi/stack-protector.rs#ssp stdout ----

error in revision `ssp`: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/abi/stack-protector.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "ssp" "--check-cfg" "cfg(test,FALSE,ssp,no_ssp)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/abi/stack-protector.ssp/a" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "stack-protector=all" "-C" "opt-level=2" "-g"
--- stderr -------------------------------
invalid template parameter
invalid template parameter
!1533 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&[u8]>", file: !2, size: 64, align: 64, elements: !1534, templateParams: !1538, identifier: "2ee1023d60f756e44f7eda0a03018438")
!1538 = !{!981}
!981 = !DICompositeType(tag: DW_TAG_structure_type, name: "&[u8]", file: !2, size: 128, align: 64, elements: !982, templateParams: !24, identifier: "31681e0c10b314f1f33e38b2779acbb4")
invalid template parameter
!3577 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&str>", file: !2, size: 64, align: 64, elements: !3578, templateParams: !3582, identifier: "dbfdaf1309d6150e32613343a033eee1")
!3582 = !{!141}
!141 = !DICompositeType(tag: DW_TAG_structure_type, name: "&str", file: !2, size: 128, align: 64, elements: !142, templateParams: !24, identifier: "9277eecd40495f85161460476aacc992")
invalid template parameter
!8837 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&std::path::PathBuf>", file: !2, size: 64, align: 64, elements: !8838, templateParams: !8842, identifier: "d16873887f549aff904b00bebd4701bc")
!8842 = !{!2701}
!2701 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !2702)
invalid template parameter
!11944 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&mut alloc::vec::into_iter::IntoIter<std::ffi::os_str::OsString, alloc::alloc::Global>>", file: !2, size: 64, align: 64, elements: !11945, templateParams: !11949, identifier: "b41e8948329bea2d84f34b746f2790ba")
!11949 = !{!4926}
!4926 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !4290)
invalid template parameter
!12006 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&()>", file: !2, size: 64, align: 64, elements: !12007, templateParams: !12011, identifier: "a2e274305fdb03d7d21533757226d1f9")
!12011 = !{!2268}
!2268 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !7)
rustc-LLVM ERROR: Broken module found, compilation aborted!


---- [ui] tests/ui/abi/stack-protector.rs#no-ssp stdout ----


error in revision `no-ssp`: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/abi/stack-protector.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--cfg" "no_ssp" "--check-cfg" "cfg(test,FALSE,ssp,no_ssp)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/abi/stack-protector.no-ssp/a" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-C" "opt-level=2" "-g"
--- stderr -------------------------------
invalid template parameter
invalid template parameter
!1533 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&[u8]>", file: !2, size: 64, align: 64, elements: !1534, templateParams: !1538, identifier: "2ee1023d60f756e44f7eda0a03018438")
!1538 = !{!981}
!981 = !DICompositeType(tag: DW_TAG_structure_type, name: "&[u8]", file: !2, size: 128, align: 64, elements: !982, templateParams: !24, identifier: "31681e0c10b314f1f33e38b2779acbb4")
invalid template parameter
!3577 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&str>", file: !2, size: 64, align: 64, elements: !3578, templateParams: !3582, identifier: "dbfdaf1309d6150e32613343a033eee1")
!3582 = !{!141}
!141 = !DICompositeType(tag: DW_TAG_structure_type, name: "&str", file: !2, size: 128, align: 64, elements: !142, templateParams: !24, identifier: "9277eecd40495f85161460476aacc992")
invalid template parameter
!8837 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&std::path::PathBuf>", file: !2, size: 64, align: 64, elements: !8838, templateParams: !8842, identifier: "d16873887f549aff904b00bebd4701bc")
!8842 = !{!2701}
!2701 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !2702)
invalid template parameter
!11944 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&mut alloc::vec::into_iter::IntoIter<std::ffi::os_str::OsString, alloc::alloc::Global>>", file: !2, size: 64, align: 64, elements: !11945, templateParams: !11949, identifier: "b41e8948329bea2d84f34b746f2790ba")
!11949 = !{!4926}
!4926 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !4290)
invalid template parameter
!12006 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&()>", file: !2, size: 64, align: 64, elements: !12007, templateParams: !12011, identifier: "a2e274305fdb03d7d21533757226d1f9")
!12011 = !{!2268}
!2268 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !7)
rustc-LLVM ERROR: Broken module found, compilation aborted!


---- [ui] tests/ui/async-await/async-closures/debuginfo-by-move-body.rs stdout ----


error: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/async-await/async-closures/debuginfo-by-move-body.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/async-closures/debuginfo-by-move-body" "-A" "unused" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/async-closures/debuginfo-by-move-body/auxiliary" "--edition=2021" "-Cdebuginfo=2"
--- stderr -------------------------------
invalid template parameter
invalid template parameter
!578 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref_mut$<&mut debuginfo_by_move_body::main::{async_block_env#0}>", file: !2, size: 64, align: 64, elements: !579, templateParams: !582, identifier: "d34e2290d6c08b07b8cae8633d7d58f1")
!582 = !{!303}
!303 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !304)
rustc-LLVM ERROR: Broken module found, compilation aborted!


---- [ui] tests/ui/async-await/issue-60709.rs stdout ----


error: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/async-await/issue-60709.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/issue-60709/a" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Copt-level=z" "-Cdebuginfo=2" "--edition=2018"
--- stderr -------------------------------
invalid template parameter
invalid template parameter
!408 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&alloc::alloc::Global>", file: !2, size: 64, align: 64, elements: !409, templateParams: !413, identifier: "1d11d63097570e9c49dcddbf0fd6792b")
!413 = !{!247}
!247 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !248)
rustc-LLVM ERROR: Broken module found, compilation aborted!


---- [ui] tests/ui/async-await/task-context-arg.rs stdout ----


error: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/async-await/task-context-arg.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/async-await/task-context-arg" "-A" "unused" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2021" "-Cdebuginfo=2"
--- stderr -------------------------------
invalid template parameter
invalid template parameter
!1512 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref_mut$<&mut core::future::ready::Ready<()>>", file: !2, size: 64, align: 64, elements: !1513, templateParams: !1516, identifier: "a39e572f6155d5d914b8d8de6c462f2b")
!1516 = !{!198}
!198 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !31)
rustc-LLVM ERROR: Broken module found, compilation aborted!


---- [ui] tests/ui/backtrace/std-backtrace.rs stdout ----


error: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/backtrace/std-backtrace.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/backtrace/std-backtrace/a" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-g" "-Cstrip=none"
--- stderr -------------------------------
invalid template parameter
invalid template parameter
!2112 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&[u8]>", file: !2, size: 64, align: 64, elements: !2113, templateParams: !2117, identifier: "2ee1023d60f756e44f7eda0a03018438")
!2117 = !{!1566}
!1566 = !DICompositeType(tag: DW_TAG_structure_type, name: "&[u8]", file: !2, size: 128, align: 64, elements: !1567, templateParams: !24, identifier: "31681e0c10b314f1f33e38b2779acbb4")
invalid template parameter
!3741 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&str>", file: !2, size: 64, align: 64, elements: !3742, templateParams: !3746, identifier: "dbfdaf1309d6150e32613343a033eee1")
!3746 = !{!141}
!141 = !DICompositeType(tag: DW_TAG_structure_type, name: "&str", file: !2, size: 128, align: 64, elements: !142, templateParams: !24, identifier: "9277eecd40495f85161460476aacc992")
invalid template parameter
!5954 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&std::ffi::os_str::OsStr>", file: !2, size: 64, align: 64, elements: !5955, templateParams: !5959, identifier: "b1c9a1da0374ad33918d340f804154c6")
!5959 = !{!3590}
!3590 = !DICompositeType(tag: DW_TAG_structure_type, name: "&std::ffi::os_str::OsStr", file: !2, size: 128, align: 64, elements: !3591, templateParams: !24, identifier: "128d80f5e7e69b3b421b7b753e8ef2")
invalid template parameter
!13993 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&mut alloc::vec::into_iter::IntoIter<std::ffi::os_str::OsString, alloc::alloc::Global>>", file: !2, size: 64, align: 64, elements: !13994, templateParams: !13998, identifier: "b41e8948329bea2d84f34b746f2790ba")
!13998 = !{!5380}
!5380 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !4457)
invalid template parameter
!14055 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&()>", file: !2, size: 64, align: 64, elements: !14056, templateParams: !14060, identifier: "a2e274305fdb03d7d21533757226d1f9")
!14060 = !{!978}
!978 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !7)
rustc-LLVM ERROR: Broken module found, compilation aborted!


---- [ui] tests/ui/backtrace/backtrace.rs stdout ----


error: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/backtrace/backtrace.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/backtrace/backtrace/a" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-g" "-Cstrip=none"
--- stderr -------------------------------
invalid template parameter
invalid template parameter
!2302 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&[u8]>", file: !2, size: 64, align: 64, elements: !2303, templateParams: !2307, identifier: "2ee1023d60f756e44f7eda0a03018438")
!2307 = !{!376}
!376 = !DICompositeType(tag: DW_TAG_structure_type, name: "&[u8]", file: !2, size: 128, align: 64, elements: !377, templateParams: !14, identifier: "31681e0c10b314f1f33e38b2779acbb4")
invalid template parameter
!4898 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&str>", file: !2, size: 64, align: 64, elements: !4899, templateParams: !4903, identifier: "dbfdaf1309d6150e32613343a033eee1")
!4903 = !{!195}
!195 = !DICompositeType(tag: DW_TAG_structure_type, name: "&str", file: !2, size: 128, align: 64, elements: !196, templateParams: !14, identifier: "9277eecd40495f85161460476aacc992")
invalid template parameter
!7242 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&u8>", file: !2, size: 64, align: 64, elements: !7243, templateParams: !7247, identifier: "b11b1f853a966900b4b36088913a388f")
!7247 = !{!227}
!227 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !228)
invalid template parameter
!7259 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&core::option::Option<u8>>", file: !2, size: 64, align: 64, elements: !7260, templateParams: !7264, identifier: "85e63dc0dbbef8483c800a92fb80dce2")
!7264 = !{!31}
!31 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !32)
invalid template parameter
!7278 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&()>", file: !2, size: 64, align: 64, elements: !7279, templateParams: !7283, identifier: "a2e274305fdb03d7d21533757226d1f9")
!7283 = !{!13}
!13 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !7)
invalid template parameter
!10275 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&alloc::string::String>", file: !2, size: 64, align: 64, elements: !10276, templateParams: !10281, identifier: "3eed7f4d0cf129dbeeb20f832779c10")
!10281 = !{!10280}
!10280 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !5839)
invalid template parameter
!15711 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&mut alloc::vec::into_iter::IntoIter<std::ffi::os_str::OsString, alloc::alloc::Global>>", file: !2, size: 64, align: 64, elements: !15712, templateParams: !15716, identifier: "b41e8948329bea2d84f34b746f2790ba")
!15716 = !{!6410}
!6410 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !5516)
rustc-LLVM ERROR: Broken module found, compilation aborted!


---- [ui] tests/ui/backtrace/dylib-dep.rs stdout ----


error: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/backtrace/dylib-dep.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/backtrace/dylib-dep/a" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/backtrace/dylib-dep/auxiliary" "-g" "-Copt-level=0" "-Cstrip=none" "-Cforce-frame-pointers=yes" "--extern" "dylib_dep_helper=/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/backtrace/dylib-dep/auxiliary/libdylib_dep_helper.so" "--extern" "auxiliary=/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/backtrace/dylib-dep/auxiliary/libdylib_dep_helper_aux.so"
--- stderr -------------------------------
invalid template parameter
invalid template parameter
!1720 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&std::ffi::os_str::OsStr>", file: !2, size: 64, align: 64, elements: !1721, templateParams: !1725, identifier: "b1c9a1da0374ad33918d340f804154c6")
!1725 = !{!1663}
!1663 = !DICompositeType(tag: DW_TAG_structure_type, name: "&std::ffi::os_str::OsStr", file: !2, size: 128, align: 64, elements: !1664, templateParams: !24, identifier: "128d80f5e7e69b3b421b7b753e8ef2")
invalid template parameter
!1948 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<ref$<&str>>", file: !2, size: 64, align: 64, elements: !1949, templateParams: !1959, identifier: "934fac1a9078bf48cacc772d8c7b40ba")
!1959 = !{!1953}
!1953 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&str>", file: !2, size: 64, align: 64, elements: !1954, templateParams: !1958, identifier: "dbfdaf1309d6150e32613343a033eee1")
invalid template parameter
!1953 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&str>", file: !2, size: 64, align: 64, elements: !1954, templateParams: !1958, identifier: "dbfdaf1309d6150e32613343a033eee1")
!1958 = !{!311}
!311 = !DICompositeType(tag: DW_TAG_structure_type, name: "&str", file: !2, size: 128, align: 64, elements: !312, templateParams: !24, identifier: "9277eecd40495f85161460476aacc992")
invalid template parameter
!1973 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&u32>", file: !2, size: 64, align: 64, elements: !1974, templateParams: !1978, identifier: "f1c4cf3b32959f305324945f7adef9c2")
!1978 = !{!1379}
!1379 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !1380)
invalid template parameter
!4496 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&[u8]>", file: !2, size: 64, align: 64, elements: !4497, templateParams: !4501, identifier: "2ee1023d60f756e44f7eda0a03018438")
!4501 = !{!291}
!291 = !DICompositeType(tag: DW_TAG_structure_type, name: "&[u8]", file: !2, size: 128, align: 64, elements: !292, templateParams: !24, identifier: "31681e0c10b314f1f33e38b2779acbb4")
invalid template parameter
!9331 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&()>", file: !2, size: 64, align: 64, elements: !9332, templateParams: !9336, identifier: "a2e274305fdb03d7d21533757226d1f9")
!9336 = !{!1271}
!1271 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !7)
rustc-LLVM ERROR: Broken module found, compilation aborted!


---- [ui] tests/ui/binding/match-arm-statics.rs stdout ----


error: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/binding/match-arm-statics.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/binding/match-arm-statics/a" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-g"
--- stderr -------------------------------
invalid template parameter
invalid template parameter
!33 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&str>", file: !2, size: 64, align: 64, elements: !34, templateParams: !44, identifier: "dbfdaf1309d6150e32613343a033eee1")
!44 = !{!38}
!38 = !DICompositeType(tag: DW_TAG_structure_type, name: "&str", file: !2, size: 128, align: 64, elements: !39, templateParams: !24, identifier: "9277eecd40495f85161460476aacc992")
invalid template parameter
!194 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<ref$<&str>>", file: !2, size: 64, align: 64, elements: !195, templateParams: !199, identifier: "934fac1a9078bf48cacc772d8c7b40ba")
!199 = !{!33}
!33 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&str>", file: !2, size: 64, align: 64, elements: !34, templateParams: !44, identifier: "dbfdaf1309d6150e32613343a033eee1")
invalid template parameter
!542 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&[u8]>", file: !2, size: 64, align: 64, elements: !543, templateParams: !547, identifier: "2ee1023d60f756e44f7eda0a03018438")
!547 = !{!458}
!458 = !DICompositeType(tag: DW_TAG_structure_type, name: "&[u8]", file: !2, size: 128, align: 64, elements: !459, templateParams: !24, identifier: "31681e0c10b314f1f33e38b2779acbb4")
rustc-LLVM ERROR: Broken module found, compilation aborted!


---- [ui] tests/ui/codegen/issue-82833-slice-miscompile.rs stdout ----


error: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/codegen/issue-82833-slice-miscompile.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/codegen/issue-82833-slice-miscompile/a" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Ccodegen-units=1" "-Cllvm-args=--inline-threshold=0" "-Clink-dead-code" "-Copt-level=0" "-Cdebuginfo=2"
--- stderr -------------------------------
invalid template parameter
invalid template parameter
!229 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&char>", file: !2, size: 64, align: 64, elements: !230, templateParams: !237, identifier: "789b50fa6f23868b37f9bd4ec3bdfd3c")
!237 = !{!234}
!234 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !235)
invalid template parameter
!302 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&alloc::string::String>", file: !2, size: 64, align: 64, elements: !303, templateParams: !352, identifier: "3eed7f4d0cf129dbeeb20f832779c10")
!352 = !{!307}
!307 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !308)
rustc-LLVM ERROR: Broken module found, compilation aborted!


---- [ui] tests/ui/cross-crate/issue-64872/issue-64872.rs stdout ----


error: auxiliary build of "/checkout/tests/ui/cross-crate/issue-64872/auxiliary/a_def_obj.rs" failed to compile: 
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/cross-crate/issue-64872/auxiliary/a_def_obj.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/cross-crate/issue-64872/issue-64872/auxiliary" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-C" "debuginfo=2" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/cross-crate/issue-64872/issue-64872/auxiliary"
--- stderr -------------------------------
invalid template parameter
invalid template parameter
!43 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&u32>", file: !2, size: 64, align: 64, elements: !44, templateParams: !48, identifier: "f1c4cf3b32959f305324945f7adef9c2")
!48 = !{!13}
!13 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !14)
rustc-LLVM ERROR: Broken module found, compilation aborted!


---- [ui] tests/ui/debuginfo/debuginfo-box-with-large-allocator.rs stdout ----


error: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/debuginfo/debuginfo-box-with-large-allocator.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/debuginfo/debuginfo-box-with-large-allocator" "-A" "unused" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Cdebuginfo=2"
--- stderr -------------------------------
invalid template parameter
invalid template parameter
!1291 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&debuginfo_box_with_large_allocator::ZST>", file: !2, size: 64, align: 64, elements: !1292, templateParams: !1296, identifier: "b72c073a332723d59aabebf85f23c84c")
!1296 = !{!419}
!419 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !420)
rustc-LLVM ERROR: Broken module found, compilation aborted!


---- [ui] tests/ui/issues/issue-24687-embed-debuginfo/main.rs stdout ----


error: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/issues/issue-24687-embed-debuginfo/main.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "-O" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-24687-embed-debuginfo/main/a" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-24687-embed-debuginfo/main/auxiliary" "-g"
--- stderr -------------------------------
invalid template parameter
invalid template parameter
!169 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&str>", file: !2, size: 64, align: 64, elements: !170, templateParams: !179, identifier: "dbfdaf1309d6150e32613343a033eee1")
!179 = !{!174}
!174 = !DICompositeType(tag: DW_TAG_structure_type, name: "&str", file: !2, size: 128, align: 64, elements: !175, templateParams: !24, identifier: "9277eecd40495f85161460476aacc992")
rustc-LLVM ERROR: Broken module found, compilation aborted!


---- [ui] tests/ui/issues/issue-31702.rs stdout ----


error: auxiliary build of "/checkout/tests/ui/issues/auxiliary/issue-31702-2.rs" failed to compile: 
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/issues/auxiliary/issue-31702-2.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-31702/auxiliary" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-g" "--crate-type" "dylib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/issues/issue-31702/auxiliary"
--- stderr -------------------------------
invalid template parameter
invalid template parameter
!1228 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&hashbrown::control::tag::Tag>", file: !2, size: 64, align: 64, elements: !1229, templateParams: !1233, identifier: "8b0bdb058533a5fdee850b3788cf2a94")
!1233 = !{!13}
!13 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !14)
invalid template parameter
!3600 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&alloc::string::String>", file: !2, size: 64, align: 64, elements: !3601, templateParams: !3605, identifier: "3eed7f4d0cf129dbeeb20f832779c10")
!3605 = !{!76}
!76 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !77)
invalid template parameter
!6823 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&mut hashbrown::raw::RawTableInner>", file: !2, size: 64, align: 64, elements: !6824, templateParams: !6828, identifier: "1a09d567cad2ac4b9d5bea6d57b50e63")
!6828 = !{!1719}
!1719 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !131)
invalid template parameter
!6926 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref_mut$<&mut hashbrown::raw::RawTableInner>", file: !2, size: 64, align: 64, elements: !6927, templateParams: !6828, identifier: "c8a92703dcf5569e41146d5d46b55097")
!6828 = !{!1719}
!1719 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !131)
rustc-LLVM ERROR: Broken module found, compilation aborted!


---- [ui] tests/ui/runtime/backtrace-debuginfo.rs stdout ----


error: test compilation failed although it shouldn't!
status: exit status: 101
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/runtime/backtrace-debuginfo.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2" "--target=x86_64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/runtime/backtrace-debuginfo/a" "-A" "internal_features" "-Crpath" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-g" "-Copt-level=0" "-Cllvm-args=-enable-tail-merge=0" "-Cforce-frame-pointers=yes" "-Cstrip=none"
--- stderr -------------------------------
invalid template parameter
invalid template parameter
!247 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&str>", file: !2, size: 64, align: 64, elements: !248, templateParams: !252, identifier: "dbfdaf1309d6150e32613343a033eee1")
!252 = !{!150}
!150 = !DICompositeType(tag: DW_TAG_structure_type, name: "&str", file: !2, size: 128, align: 64, elements: !151, templateParams: !30, identifier: "9277eecd40495f85161460476aacc992")
invalid template parameter
!3064 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&std::io::error::Error>", file: !2, size: 64, align: 64, elements: !3065, templateParams: !3069, identifier: "e0fe2fd917e448cf2c8a7607d3a53774")
!3069 = !{!3061}
!3061 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !3062)
invalid template parameter
!4792 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&()>", file: !2, size: 64, align: 64, elements: !4793, templateParams: !4797, identifier: "a2e274305fdb03d7d21533757226d1f9")
!4797 = !{!372}
!372 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !7)
invalid template parameter
!4809 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&core::num::error::IntErrorKind>", file: !2, size: 64, align: 64, elements: !4810, templateParams: !4814, identifier: "5c2ec504b0da96dee71b89c09bef93f0")
!4814 = !{!362}
!362 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !363)
invalid template parameter
!4828 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&u8>", file: !2, size: 64, align: 64, elements: !4829, templateParams: !4833, identifier: "b11b1f853a966900b4b36088913a388f")
!4833 = !{!353}
!353 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !220)
invalid template parameter
!4845 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<ref$<&str>>", file: !2, size: 64, align: 64, elements: !4846, templateParams: !4850, identifier: "934fac1a9078bf48cacc772d8c7b40ba")
!4850 = !{!247}
!247 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&str>", file: !2, size: 64, align: 64, elements: !248, templateParams: !252, identifier: "dbfdaf1309d6150e32613343a033eee1")
invalid template parameter
!4873 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&core::option::Option<u8>>", file: !2, size: 64, align: 64, elements: !4874, templateParams: !4878, identifier: "85e63dc0dbbef8483c800a92fb80dce2")
!4878 = !{!343}
!343 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !344)
invalid template parameter
!5818 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&[u8]>", file: !2, size: 64, align: 64, elements: !5819, templateParams: !5823, identifier: "2ee1023d60f756e44f7eda0a03018438")
!5823 = !{!1195}
!1195 = !DICompositeType(tag: DW_TAG_structure_type, name: "&[u8]", file: !2, size: 128, align: 64, elements: !1196, templateParams: !30, identifier: "31681e0c10b314f1f33e38b2779acbb4")
invalid template parameter
!16060 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref_mut$<&[char]>", file: !2, size: 64, align: 64, elements: !16061, templateParams: !16064, identifier: "24d9f042409960c178e4c0f8db5a3140")
!16064 = !{!8224}
!8224 = !DICompositeType(tag: DW_TAG_structure_type, name: "&[char]", file: !2, size: 128, align: 64, elements: !8225, templateParams: !30, identifier: "3bcd4cd08bb9adc4f04834855e692a5d")
invalid template parameter
!18151 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&mut alloc::vec::into_iter::IntoIter<std::ffi::os_str::OsString, alloc::alloc::Global>>", file: !2, size: 64, align: 64, elements: !18152, templateParams: !18156, identifier: "b41e8948329bea2d84f34b746f2790ba")
!18156 = !{!2813}
!2813 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !1007)
invalid template parameter
!18205 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref$<&mut alloc::vec::into_iter::IntoIter<alloc::string::String, alloc::alloc::Global>>", file: !2, size: 64, align: 64, elements: !18206, templateParams: !18210, identifier: "42c1fc9d33d02e27c881819425cd118a")
!18210 = !{!864}
!864 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !865)
invalid template parameter
!19906 = !DICompositeType(tag: DW_TAG_structure_type, name: "ref_mut$<&mut i32>", file: !2, size: 64, align: 64, elements: !19907, templateParams: !19911, identifier: "a1f3b6daa3cb35a9eba6ef523a3c4a7f")
!19911 = !{!19910}
!19910 = !DIDerivedType(tag: DW_TAG_reference_type, baseType: !72)
rustc-LLVM ERROR: Broken module found, compilation aborted!



failures:

@Walnut356
Copy link
Contributor Author

Uh... huh. I can't replicate this test failure on my end (WSL Ubuntu, nor *-windows-gnu). Judging by it erroring mostly on str and slice, maybe i'm running into this issue? That or the conflict between the type of the element and the type of the fake pointer to the element is causing problems, since both those debuginfo's are being applied to the same value.

I'm not sure there's a solution that's less of a hack than the r-value reference workaround, and that Just Worked™ in a lot of ways that this one doesn't (e.g. the visualizer scripts). Either way, if i can't test this solution, I can't really fix it so it is what it is.

@Walnut356 Walnut356 closed this Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants