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

Add support for rewriting unsafe methods #9

Open
Miista opened this issue Jan 13, 2024 · 1 comment
Open

Add support for rewriting unsafe methods #9

Miista opened this issue Jan 13, 2024 · 1 comment
Labels
enhancement New feature or request priority: low The issue has low priority

Comments

@Miista
Copy link
Owner

Miista commented Jan 13, 2024

We only discovered this because between .NET Framework 4.8 and .NET 6, calling DateTime.UtcNow invokes unsafe code.

The question is now: how to translate this call?

From what I can gather we have only a metadata signature token (32 bit) and we must somehow use that to resolve and call the correct method (as identified by the token).

UPDATE 2024-06-03: The issue with DateTime.UtcNow only manifests if it is invoked without there existing a shim for it. That is, we can shim the method without issues. However, if we do not shim the method, rewriting it fails.

@Miista
Copy link
Owner Author

Miista commented Jan 13, 2024

We should probably also decide whether we support:

@Miista Miista added enhancement New feature or request priority: low The issue has low priority labels Jan 13, 2024
@Miista Miista mentioned this issue Jan 14, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority: low The issue has low priority
Projects
None yet
Development

No branches or pull requests

1 participant