Skip to content

Compiler crashes displaying error line when compiling .rc files #677

Closed
@brson

Description

@brson

When compiling a .rc file and there is an error in one of the .rs files. The compiler will crash when trying to use the codemap to display which line the error was on.

Example:

../src/lib/test.rs:82:23:82:52: error: unknown type in conversion:
rt: d76f:main:main:                   upcall fail 'Assertion end <= str::byte_len(s) failed', /media/src/rust-tinderbox/srcdir-snap-stage3-x86_64-unknown-linux-gnu/src/lib/str.rs:393

This is likely because it is trying to relate numbers in the codemap to bytes in the file, but the codemap treats all files in the compilation unit as if they were one giant file. So when it goes to look up line 5 in foo.rs it may (currently) end up looking for byte 17000.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions