-
Notifications
You must be signed in to change notification settings - Fork 57
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
New function metadata init cause runtime crash with XrefScan #107
Comments
HookedBehemoth
changed the title
New RVO generation cause runtime crash with XrefScan
New RVA generation cause runtime crash with XrefScan
Sep 16, 2023
HookedBehemoth
changed the title
New RVA generation cause runtime crash with XrefScan
New function metadata init cause runtime crash with XrefScan
Sep 16, 2023
Ok I missed that those aren't tokens but object pointers. |
Ok this is even more annoying than I had anticipated.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the past, il2cpp would emit a single call to
il2cpp_codegen_initialize_method
with a method token. Now there are multiple calls toil2cpp_codegen_initialize_runtime_metadata
with potentially multiple tokens.When using XrefScan on a method before the runtime, values can be left uninitialized, resulting in a segfault/AccessViolation.
Didn't bisect when exactly codegen was altered but I can observe this behavior in 2022.3.5
I couldn't find any conversation on this issue so far. I'll work on a patch myself if you don't have something waiting for it already.
This would probably change the Cache-Attribute parameter "public long MetadataInitTokenRva;" to
public long[] MetadataInitTokenRvas;
.I don't expect this to cause any major breakage on any prior version so I don't think I'll actually have to bisect the version and nail this logic down.
Steps for reproduction
public class Test : MonoBehaviour
{
void Update()
{
Debug.Log("test");
Debug.Log("This is a test with a long string");
}
}
The text was updated successfully, but these errors were encountered: