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

Metadata 27+ Xref crash fix #110

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

HookedBehemoth
Copy link
Contributor

On previous versions, one call per method instantiated all globals used.
Now there is one call per global. Instead of a method-handle, the pointers are passed directly.
With method inlining, multiple of these blocks are added into one method

This bug would manifest as hard crashes during xref on methods that weren't fully initialized by the runtime.

TODO: Only one of the flags is set and we might check the wrong one

I got distracted and never properly implemented this. I hope these patches can help you.

@HookedBehemoth
Copy link
Contributor Author

I think the pointers where just polluted so I couldn't just null check, but I'm not sure anymore

@HookedBehemoth
Copy link
Contributor Author

This is still too brittle... I'm getting crashes with some functions again.

@HookedBehemoth
Copy link
Contributor Author

Did anyone get a chance to look into this PR or the issue at hand?
It would be nice to get the issue resolved upstream.

@krulci
Copy link
Contributor

krulci commented Apr 8, 2024

Any updates on this? @HookedBehemoth
I wasn't able to find you on Melon or BepInEx's server anymore

@HookedBehemoth
Copy link
Contributor Author

Works but the maintainers here don't seem to be interested in having this upstream

@krulci
Copy link
Contributor

krulci commented Apr 8, 2024

Works but the maintainers here don't seem to be interested in having this upstream

In some version, I am getting Op0Kind = Register

@HookedBehemoth
Copy link
Contributor Author

Do you actually know what this patch is for or do you just use this issue to report a bug that has nothing to do with this?

@krulci
Copy link
Contributor

krulci commented Apr 9, 2024

Do you actually know what this patch is for or do you just use this issue to report a bug that has nothing to do with this?

I am not entirely sure if is related. But, using this PR or the original with Metadata 29, I get Argument out of range on certain xref. The op0kind is register. I supposed the address decoder has some issue.

@HookedBehemoth
Copy link
Contributor Author

So it probably has nothing to do with this patch?

HookedBehemoth and others added 5 commits May 28, 2024 22:00
On previous versions, one call per method instantiated all globals used.
Now there is one call per global. Instead of a method-handle, the pointers are passed directly.
With method inlining, multiple of these blocks are added into one method

TODO: Only one of the flags is set and we might check the wrong one
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.

None yet

2 participants