Skip to content

Miscompilation in lalrpop 0.19.6 causes LLVM error in nightly 2021-08-15/16 #88102

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ThePuzzlemaker opened this issue Aug 17, 2021 · 2 comments
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-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@ThePuzzlemaker
Copy link
Contributor

Code

Create an empty binary project, and add lalrpop = "=0.19.6" to the Cargo.toml. No additional code is necessary.

I expected to see this happen: Program builds.

Instead, this happened: Compiler crashes:

$ cargo +nightly build
   ... snip ...
   Compiling lalrpop v0.19.6
Basic Block in function '_ZN7lalrpop3tok9Tokenizer10take_until17h0e5828b8a9330eebE' does not have terminator!
label %9
in function _ZN7lalrpop3tok9Tokenizer10take_until17h0e5828b8a9330eebE
LLVM ERROR: Broken function found, compilation aborted!
error: could not compile `lalrpop`

This is reproducible with a clean build environment. (I originally spotted this in my CI and was luckily able to reproduce it on my laptop). I apologize that I cannot give a better MCVE at the moment.

Version it worked on

It most recently worked on:
Note that this is nighty-2021-08-14, I'm unsure why it says 2021-08-13.
rustc --version --verbose:

rustc 1.56.0-nightly (5a19ffe1c 2021-08-13)
binary: rustc
commit-hash: 5a19ffe1c2b99d9e09706cc286aad1ec0868eddb
commit-date: 2021-08-13
host: x86_64-unknown-linux-gnu
release: 1.56.0-nightly
LLVM version: 12.0.1

Version with issue

This issue also occurs with nightly-2021-08-16.

Note that this is nightly-2021-08-15, as with the previous I'm unsure why it says 2021-08-14.
rustc --version --verbose:

rustc 1.56.0-nightly (8007b506a 2021-08-14)
binary: rustc
commit-hash: 8007b506ac5da629f223b755f5a5391edd5f6d01
commit-date: 2021-08-14
host: x86_64-unknown-linux-gnu
release: 1.56.0-nightly
LLVM version: 12.0.1

I cannot currently bisect further at this point.

@rustbot modify labels: +T-compiler +requires-nightly +A-LLVM +C-bug +E-needs-bisection

@rustbot rustbot added 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-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 17, 2021
@ThePuzzlemaker ThePuzzlemaker changed the title Miscompilation in lalrpop 0.19.6 causes LLVM error in nightly 2021-08-16 Miscompilation in lalrpop 0.19.6 causes LLVM error in nightly 2021-08-15 Aug 17, 2021
@ThePuzzlemaker ThePuzzlemaker changed the title Miscompilation in lalrpop 0.19.6 causes LLVM error in nightly 2021-08-15 Miscompilation in lalrpop 0.19.6 causes LLVM error in nightly 2021-08-15/16 Aug 17, 2021
@jamestmartin
Copy link

I was able to reproduce this bug with a toolchain that reports itself correctly.

$ rustc +nightly --version --verbose
rustc 1.56.0-nightly (0035d9dce 2021-08-16)
binary: rustc
commit-hash: 0035d9dcecee49d1f7349932bfa52c05a6f83641
commit-date: 2021-08-16
host: x86_64-unknown-linux-gnu
release: 1.56.0-nightly
LLVM version: 12.0.1

@SNCPlay42
Copy link
Contributor

Duplicate of #88043?

@dtolnay dtolnay closed this as completed Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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-bisection Call for participation: This issue needs bisection: https://github.com/rust-lang/cargo-bisect-rustc requires-nightly This issue requires a nightly compiler in some way. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

5 participants