Skip to content

Incremental compilation regression from 1.79 to 1.80: rustc-LLVM ERROR: Intervals are contiguous/overlapping #128555

Closed

Description

Code

Repro repository and steps: #128555 (comment)

I've bisected between 1.79.0 and 1.80.0:

searched nightlies: from nightly-2024-04-28 to nightly-2024-06-07
regressed nightly: nightly-2024-05-10
searched commit range: 87293c9...8f9080d
regressed commit: cb93c24

bisected with cargo-bisect-rustc v0.6.9

Host triple: x86_64-pc-windows-msvc
Reproduce with:

cargo bisect-rustc --start 1.79.0 --end 1.80.0 --preserve -- build --release -p <crate-name>
Old context

Context

It's a company project with a workspace that compiles ~680 crates on a clean compile.

From initial testing it seems like an incremental compilation bug :S cargo build works, cargo build --release fails, but when setting incremental = false in [profile.relese], cargo build --release succeeds again.

cargo build --release -p <crate-name> also reproduces the issue, dropping the number of crates down to "only" 203.

This is our profile config:

[profile.dev]
debug = 0
incremental = true
opt-level = 1

[profile.dev.package."*"]
opt-level = 3

[profile.dev.build-override]
codegen-units = 8
debug = 0
debug-assertions = false
opt-level = 2
overflow-checks = false

[profile.release]
debug = 1
# overwritten in xtask for production builds
incremental = true

[profile.release.build-override]
codegen-units = 8
debug = 0
debug-assertions = false
opt-level = 0
overflow-checks = false

Meta

This reproduces on 1.80 and the current nightly (as of writing this ticket). This does not reproduce on 1.79.0.

rustc --version --verbose:

rustc 1.80.0 (051478957 2024-07-21)
binary: rustc
commit-hash: 051478957371ee0084a7c0913941d2a8c4757bb9
commit-date: 2024-07-21
host: x86_64-pc-windows-msvc
release: 1.80.0
LLVM version: 18.1.7

and

rustc 1.82.0-nightly (8e86c9567 2024-08-01)
binary: rustc
commit-hash: 8e86c9567154dc5a9ada15ab196d23eae2bd7d89
commit-date: 2024-08-01
host: x86_64-pc-windows-msvc
release: 1.82.0-nightly
LLVM version: 19.1.0

Error output

Intervals are contiguous
!40 = !{i8 -20, i8 -17, i8 4, i8 -20}
rustc-LLVM ERROR: Broken module found, compilation aborted!
error: could not compile `<crate name>` (lib)

There is no backtrace being printed, even with RUST_BACKTRACE=1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.C-bugCategory: This is a bug.I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.llvm-fixed-upstreamIssue expected to be fixed by the next major LLVM upgrade, or backported fixes

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions