Skip to content

LLVM ERROR: Broken module with -Cdebuginfo=2 -Zsanitizer=cfi -Clto #100783

Open
@matthiaskrgr

Description

@matthiaskrgr

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

Metadata

Metadata

Assignees

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-control-flow-integrityArea: Control Flow Integrity (CFI) security mitigationA-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)A-sanitizersArea: Sanitizers for correctness and code qualityC-bugCategory: This is a bug.E-needs-testCall 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) ❄️PG-exploit-mitigationsProject group: Exploit mitigationsT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.glacierICE tracked in rust-lang/glacier.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions