LTO=thin appears broken on nightly rustc? #110256
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-bug
Category: This is a bug.
E-needs-mcve
Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
P-high
High priority
regression-untriaged
Untriaged performance or correctness regression.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
When building https://github.com/alacritty/alacritty with
cargo build -r
on nightly rust the resulting binary will segfault. This does not occur when built with stable rust.This behavior change appears to be gated by lto="thin".
Code
I tried this code:
rustup default nightly rustup update git clone https://github.com/alacritty/alacritty cd alacritty cargo build -r ./target/release/alacritty
I expected to see this happen: alacritty to startup as occurs with
rustup default stable
Instead, this happened: compiled program segfaults
Version it worked on
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.68.2 (9eb3afe 2023-03-27)
Version with regression
nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.70.0-nightly (9df3a39 2023-04-11)
rustc --version --verbose
:This appears to be triggered by lto being set to "thin" in Cargo.toml
See alacritty issues: alacritty/alacritty#6818 and alacritty/alacritty#6854 for investigation.
The text was updated successfully, but these errors were encountered: