Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault on OpaqueClosure MethodInstance registration #56833

Open
wsmoses opened this issue Dec 14, 2024 · 0 comments
Open

Segfault on OpaqueClosure MethodInstance registration #56833

wsmoses opened this issue Dec 14, 2024 · 0 comments
Labels
backport 1.10 Change should be backported to the 1.10 release backport 1.11 Change should be backported to release-1.11 bug Indicates an unexpected problem or unintended behavior GC Garbage collector

Comments

@wsmoses
Copy link
Contributor

wsmoses commented Dec 14, 2024

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

@wsmoses wsmoses added bug Indicates an unexpected problem or unintended behavior GC Garbage collector backport 1.10 Change should be backported to the 1.10 release backport 1.11 Change should be backported to release-1.11 labels Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.10 Change should be backported to the 1.10 release backport 1.11 Change should be backported to release-1.11 bug Indicates an unexpected problem or unintended behavior GC Garbage collector
Projects
None yet
Development

No branches or pull requests

1 participant