Skip to content

Conversation

@y0soro
Copy link
Contributor

@y0soro y0soro commented Dec 22, 2025

The current RunFinalizer signatures can not reliably matches address of RunFinalizer, so fallback to xref scan as a last resort.

RunFinalizer is used in RegisterFinalizer and RegisterFinalizer is used in icall GC._ReRegisterForFinalize, which is relatively simple compared to other users of RegisterFinalizer. So we can traversal into GC._ReRegisterForFinalize to find address of RunFinalizer.

The xref scan handles both inlined and not inlined cases.


Tested and verified the found RunFinalizer address to be actual RunFinalizer for both inlined and not inlined cases.

The current `RunFinalizer` signatures can not reliably matches address of `RunFinalizer`, so fallback to xref scan as a last resort.

`RunFinalizer` is used in `RegisterFinalizer`, and `RegisterFinalizer` is used in icall GC._ReRegisterForFinalize which is relatively simple compared to other users of `RegisterFinalizer`.
So we can traversal into `GC._ReRegisterForFinalize` to find address of `RunFinalizer`.

The xref scan handles both inlined and not inlined cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant