Skip to content

Provide callbacks into VM binding for mutator prepare/release? #1017

@k-sareen

Description

@k-sareen

We've recently added the BumpPointer struct so that bindings can embed just the cursor and limit into their TLS instead of embedding the very large Mutator struct (which may not always be possible). However, there is a subtle pitfall if we use this naively. The pitfall is described in detail here. The tl;dr is that all mutators' cached cursor and limit need to be reset, not just the mutator which failed the allocation.

This begs the question if we should provide an explicit API that is called for mutator prepare/release so that the VM can update internal state? We used to have VMCollection::prepare_mutator to allow for VM-specific behaviour, however its semantics were unclear and it was removed in #875.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-normalPriority: Normal.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions