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: "byte index 15 is not a char boundary" #68629

Closed
dwrensha opened this issue Jan 29, 2020 · 0 comments · Fixed by #68633
Closed

internal compiler error: "byte index 15 is not a char boundary" #68629

dwrensha opened this issue Jan 29, 2020 · 0 comments · Fixed by #68633
Assignees
Labels
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.

Comments

@dwrensha
Copy link
Contributor

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

$ echo IBwfdHMAIVt7aQoAACAgZm4gct27b2E+ct27bQ== | base64 --decode > main.rs
$ rustc main.rs
error: unknown start of token: \u{1c}
 --> main.rs:1:2
  |
1 |  ts![{i
  |  ^

error: unknown start of token: \u{1f}
 --> main.rs:1:3
  |
1 |  ts![{i
  |  ^

error: unknown start of token: \u{0}
 --> main.rs:1:6
  |
1 |  ts![{i
  |    ^

error: unknown start of token: \u{0}
 --> main.rs:2:1
  |
2 |   fn rݻoa>rݻm
  | ^

error: unknown start of token: \u{0}
 --> main.rs:2:2
  |
2 |   fn rݻoa>rݻm
  | ^

error: this file contains an unclosed delimiter
 --> main.rs:2:16
  |
1 |  ts![{i
  |     -- unclosed delimiter
  |     |
  |     unclosed delimiter
2 |   fn rݻoa>rݻm
  |              ^

error: macros that expand to items must be delimited with braces or followed by a semicolon
 --> main.rs:1:8
  |
1 |    ts![{i
  |  _____^
2 | |   fn rݻoa>rݻm
  | |_____________^
  |
thread 'rustc' panicked at 'byte index 15 is not a char boundary; it is inside 'ݻ' (bytes 14..16) of `  fn rݻoa>rݻm`', src/libcore/str/mod.rs:2154:5
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.42.0-nightly (3761dcd34 2020-01-28) running on x86_64-unknown-linux-gnu

error: aborting due to 6 previous errors

My compiler version is:

$ rustc -vV
rustc 1.42.0-nightly (3761dcd34 2020-01-28)
binary: rustc
commit-hash: 3761dcd3467441f78939ccb3b341b03b6a7558d7
commit-date: 2020-01-28
host: x86_64-unknown-linux-gnu
release: 1.42.0-nightly
LLVM version: 9.0

I also observe the error on beta, but not on stable.

@JohnTitor JohnTitor 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 Jan 29, 2020
@JohnTitor JohnTitor self-assigned this Jan 29, 2020
@bors bors closed this as completed in cdd41ea Feb 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants