Skip to content

compiletest: Panic in ProcOutput::extend #98469

Description

@mystor

in #96551 the logic for deciding when to filter paths was changed in compiletest such that known paths are always considered to be 32 bytes long.

Unfortunately this logic has an error in the case where the known path is shorter than 32 bytes, as the logic may decide to abbreviate the output due to it exceeding HEAD_LEN + TAIL_LEN bytes in length, however the output isn't long enough, so the following check underflows, leading to a panic in split_off:

let tail = middle.split_off(middle.len() - TAIL_LEN).into_boxed_slice();

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-compiletestArea: The compiletest test runnerA-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions