Closed
Description
Code
rustc -Zsanitizer=cfi -Clto --edition=2021 -Cdebuginfo=2 -Copt-level=2
use std::io::{self, Write};
fn f(wr: &mut dyn Write) {
wr.write_all(b"hello").ok().expect("failed");
}
fn main() {
let mut wr = Box::new(io::stdout()) as Box<dyn Write>;
f(&mut wr);
}
Meta
rustc --version --verbose
:
rustc 1.73.0-nightly (500647fd8 2023-07-27)
binary: rustc
commit-hash: 500647fd8138cc09e87edb08d62f81654fbf6ef8
commit-date: 2023-07-27
host: x86_64-unknown-linux-gnu
release: 1.73.0-nightly
LLVM version: 16.0.5
Error output
<output>
Backtrace
inlinable function call in a function with debug info must have a !dbg location
%12 = invoke noundef ptr @"_ZN57_$LT$std..io..stdio..Stdout$u20$as$u20$std..io..Write$GT$9write_all17h607695b79a9ca4b5E"(ptr noundef nonnull align 1 %6, ptr noalias noundef nonnull readonly align 1 @anon.dae3f8c0716a6eb28d61d069331568f8.6, i64 noundef 5)
to label %13 unwind label %18
inlinable function call in a function with debug info must have a !dbg location
%12 = invoke noundef ptr @"_ZN57_$LT$std..io..stdio..Stdout$u20$as$u20$std..io..Write$GT$9write_all17h607695b79a9ca4b5E"(ptr noundef nonnull align 1 %6, ptr noalias noundef nonnull readonly align 1 @anon.dae3f8c0716a6eb28d61d069331568f8.6, i64 noundef 5)
to label %13 unwind label %18
LLVM ERROR: Broken module found, compilation aborted!