Skip to content

Segfault on OpaqueClosure MethodInstance registration #56833

Open
@wsmoses

Description

Tested on 1.10 locally.

Compiling and running an opaque closure eventually calls registerJITObject

void JITDebugInfoRegistry::registerJITObject(const object::ObjectFile &Object,

This maps the JIT address to the methodinstance globally in the JIT:

linfomap[Addr] = std::make_pair(Size, codeinst->def);

Later on, this will be looked up, e.g., but lookupLInfo for stacktraces.

However, it appears that the OpaqueClosure's MI is not globally rooted. Which means that it gets garbage collected. But garbage collection does not remove things from the jit registration. And thus when the stack trace mechanism tries to find it.....it segfaults

cc @vchuravy @Keno @vtjnash @gbaraldi

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    GCGarbage collectorbackport 1.10Change should be backported to the 1.10 releasebackport 1.11Change should be backported to release-1.11bugIndicates an unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions