Skip to content

Implementation of GC is not sound with resource limiters #11409

@alexcrichton

Description

@alexcrichton

This line of code:

.grow(delta_pages_for_alloc, Some(self.traitobj().as_mut()))?

expands a borrow of &mut StoreOpaque (self in this case) into a &mut dyn VMStore which is effectively a &mut StoreInner<T>. This is a "widening" operation which makes the original mutable borrow wider by encompassing more fields. This is not a sound operation because a caller might simultaneously be borrowing &mut StoreOpaque and &mut T or similarly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    wasm-proposal:gcIssues with the implementation of the gc wasm proposalwasmtime:unsafe-codeIssues related to `unsafe` blocks in Wasmtime over time, either reducing or scoping them typically.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions