Skip to content

Runtime-specific panic/fail #746

Open
@qinsoon

Description

@qinsoon

Currently MMTk panics using Rust's built-in panic mechanism. However, this may not work with some runtimes. @wks found that in Ruby, panicking in a Rust thread does not cause the process to crash. We probably need an API similar to Collection::out_of_memory() and allow the runtime to implement panic in their own way.

fn out_of_memory(_tls: VMThread, err_kind: AllocationError) {

See https://doc.rust-lang.org/std/panic/fn.set_hook.html.

We need to be careful that we should only capture MMTk's panic. If the runtime has other component written in Rust, we should not capture their panic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-interfaceArea: Interface/APIC-featureCategory: FeatureF-good-first-issueCall For Participation: Suitable issues for first-time contributorsP-normalPriority: Normal.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions