Skip to content

Fix attempted to read from stolen value #27

Closed
@W95Psp

Description

@W95Psp

The frontend browses items of a crate in an order that causes this bug.
Some data in the Rust compiler is kept in a Steal, which is basically a box whose content can be stolen, that is pulled out of the memory (rustc uses arenas)

Thus, the order in which we browse the crate to export every item matters: sometimes I inspect things that happens to be stolen before because of some previous inspections.
This is particularly true for constants, it seems.

Status: mostly fixed

However, I tried Hax on core, and I get new stolen stuff. Thus, there exists some scenarios in which this still fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium priorityfrontendIssue in the Rust to JSON translationneeds-triageMark an issue that needs triage: add label, add more contents

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions