Skip to content

Memtrace does not play well with asynchronous exceptions #2

@gadmm

Description

@gadmm

Memtrace catches exceptions without necessarily re-raising them, and places itself in an invalid state when this happens (see https://github.com/janestreet/memtrace/blob/master/src/memprof_tracer.ml). But some programs around rely on exceptions arising from signals handlers (e.g. for sigint or sigalrm) or finalisers (e.g. Gc.alarms), which do not denote a failure of memtrace but should always be re-raised by the memprof callbacks.

The most straightforward solution is to delay the possibly-raising callbacks inside the memprof callbacks with a solution such as proposed here: ocaml/ocaml#8961. I record this issue as a reminder for when such a solution is available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    forwarded-to-js-devsThis report has been forwarded to Jane Street's internal review system.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions