Repository navigation
LLVM ERROR: Broken module with -Cdebuginfo=2 -Zsanitizer=cfi -Clto #100783
Copy link
Copy link
Closed
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-control-flow-integrityArea: Control Flow Integrity (CFI) security mitigationArea: Control Flow Integrity (CFI) security mitigationA-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)A-sanitizersArea: Sanitizers for correctness and code qualityArea: Sanitizers for correctness and code qualityC-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️PG-exploit-mitigationsProject group: Exploit mitigationsProject group: Exploit mitigationsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.
Description
Code
./src/test/ui/issues/issue-27901.rs
// run-pass
trait Stream { type Item; }
impl<'a> Stream for &'a str { type Item = u8; }
fn f<'s>(s: &'s str) -> (&'s str, <&'s str as Stream>::Item) {
(s, 42)
}
fn main() {
let fx = f as for<'t> fn(&'t str) -> (&'t str, <&'t str as Stream>::Item);
assert_eq!(fx("hi"), ("hi", 42));
}Meta
rustc --version --verbose:
rustc 1.65.0-nightly (0b79f758c 2022-08-18)
binary: rustc
commit-hash: 0b79f758c9aa6646606662a6d623a0752286cd17
commit-date: 2022-08-18
host: x86_64-unknown-linux-gnu
release: 1.65.0-nightly
LLVM version: 15.0.0
Error output
rustc ./issue-27901.rs -Cdebuginfo=2 -Zsanitizer=cfi -Clto
inlinable function call in a function with debug info must have a !dbg location
call void @_ZN11issue_279011f17h923e371f4763f6b8E.cfi(ptr sret({ { ptr, i64 }, i8, [7 x i8] }) %6, ptr align 1 @3, i64 2)
inlinable function call in a function with debug info must have a !dbg location
call void @_ZN11issue_279011f17h923e371f4763f6b8E.cfi(ptr sret({ { ptr, i64 }, i8, [7 x i8] }) %6, ptr align 1 @3, i64 2)
LLVM ERROR: Broken module found, compilation aborted!
Backtrace
same
Reacted by Felipe S. S. Schneider
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-control-flow-integrityArea: Control Flow Integrity (CFI) security mitigationArea: Control Flow Integrity (CFI) security mitigationA-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)Area: Debugging information in compiled programs (DWARF, PDB, etc.)A-sanitizersArea: Sanitizers for correctness and code qualityArea: Sanitizers for correctness and code qualityC-bugCategory: This is a bug.Category: This is a bug.E-needs-testCall for participation: An issue has been fixed and does not reproduce, but no test has been added.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️PG-exploit-mitigationsProject group: Exploit mitigationsProject group: Exploit mitigationsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.ICE tracked in rust-lang/glacier.
Activity
add 5 ices
rcvalle commentedon Aug 27, 2022
@rustbot claim
JohnTitor commentedon May 5, 2023
Triage: This is no longer ICE since today's nightly.
@rustbot labels: +E-needs-test
matthiaskrgr commentedon Aug 9, 2023
I think this is still reproducible:
./tests/ui/associated-types/associated-types-doubleendediterator-object.rsrustc -Zsanitizer-cfi-normalize-integers -Clto -Zsanitizer=cfi -Ccodegen-units=1 -Cdebuginfo=2 -Copt-level=3 ./tests/ui/associated-types/associated-types-doubleendediterator-object.rsJules-Bertholet commentedon Apr 8, 2024
@rustbot label A-sanitizers
1c3t3a commentedon Nov 1, 2024
I am unable to reproduce this on latest nightly.
1c3t3a commentedon Nov 5, 2024
It seems like this is coming up again in #132615. The example here doesn't throw an error for me though.
Rollup merge of rust-lang#132702 - 1c3t3a:issue-132615, r=rcvalle
Unrolled build for rust-lang#132702
1c3t3a commentedon Nov 15, 2024
This can be closed as it was fixed in #132702.
Rollup merge of rust-lang#132702 - 1c3t3a:issue-132615, r=rcvalle
Enselic commentedon Oct 7, 2025
Triage: Your PR also added a test so yes, this can be closed. Thanks!