Skip to content

assertion failed: bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32 #68730

Closed
@dwrensha

Description

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

$ echo ZW51bQBlbQDLgsuC | base64 --decode > main.rs
$ rustc main.rs
error: unknown start of token: \u{0}
 --> main.rs:1:5
  |
1 | enumem˂˂
  |     ^

error: unknown start of token: \u{0}
 --> main.rs:1:8
  |
1 | enumem˂˂
  |       ^

error: unknown start of token: \u{2c2}
 --> main.rs:1:9
  |
1 | enumem˂˂
  |       ^
  |
help: Unicode character '˂' (Modifier Letter Left Arrowhead) looks like '<' (Less-Than Sign), but it is not
  |
1 | enumem<˂
  |       ^

error: unknown start of token: \u{2c2}
 --> main.rs:1:10
  |
1 | enumem˂˂
  |        ^
  |
help: Unicode character '˂' (Modifier Letter Left Arrowhead) looks like '<' (Less-Than Sign), but it is not
  |
1 | enumem˂<
  |        ^

thread 'rustc' panicked at 'assertion failed: bpos.to_u32() >= mbc.pos.to_u32() + mbc.bytes as u32', src/librustc_span/source_map.rs:840: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.42.0-nightly (cd1ef390e 2020-01-31) running on x86_64-unknown-linux-gnu

error: aborting due to 4 previous errors

The same error happens on stable, beta, and nightly.

Activity

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

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-parserArea: The parsing of Rust source code to an ASTC-bugCategory: This is a bug.D-Unicode-unawareDiagnostics: Diagnostics that are unaware of Unicode and trigger codepoint boundary assertionsI-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.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions