Skip to content
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

internal compiler error on 'assertion failed: bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32' #66473

Closed
dwrensha opened this issue Nov 16, 2019 · 3 comments · Fixed by #68236
Assignees
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-parser Area: The parsing of Rust source code to an AST C-bug Category: This is a bug. D-Unicode-unaware Diagnostics: Diagnostics that are unaware of Unicode and trigger codepoint boundary assertions E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@dwrensha
Copy link
Contributor

dwrensha commented Nov 16, 2019

I'm seeing an internal compiler error on the following input (found by fuzz-rustc):

$ echo ICPNiAAAAAAAAAAAAAAAAAAAAAAAAAoLHTYdAAA= | base64 --decode > main.rs
$ rustc main.rs
error: unknown start of token: \u{348}
 --> main.rs:1:3
  |
1 |  #͈
  |   ^

...

error: unknown start of token: \u{0}
 --> main.rs:2:6
  |
2 | 
    6
  |  ^

thread 'rustc' panicked at 'assertion failed: bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32', src/libsyntax/source_map.rs:867:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

error: internal compiler error: unexpected panic

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.41.0-nightly (1bd30ce2a 2019-11-15) running on x86_64-apple-darwin

error: aborting due to 23 previous errors

Note that a similar issue (#58094) was recently closed. The fix for that (#66054 it seems) apparently does not prevent this crash.

This issue has been assigned to @CosineP via this comment.

@jonas-schievink jonas-schievink added A-parser Area: The parsing of Rust source code to an AST C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 16, 2019
@CosineP
Copy link

CosineP commented Nov 16, 2019

@rustbot claim

@rustbot rustbot self-assigned this Nov 16, 2019
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Nov 18, 2019
@JohnTitor
Copy link
Member

It seems the ICE has been fixed in latest nightly.

@JohnTitor
Copy link
Member

Bisected, I think it has been fixed by #68084. Adding regression test is reasonable so marked as E-needstest.

@JohnTitor JohnTitor added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Jan 14, 2020
@bors bors closed this as completed in 2039d7e Jan 15, 2020
@jieyouxu jieyouxu added A-diagnostics Area: Messages for errors, warnings, and lints D-Unicode-unaware Diagnostics: Diagnostics that are unaware of Unicode and trigger codepoint boundary assertions labels Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-parser Area: The parsing of Rust source code to an AST C-bug Category: This is a bug. D-Unicode-unaware Diagnostics: Diagnostics that are unaware of Unicode and trigger codepoint boundary assertions E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants