-
Notifications
You must be signed in to change notification settings - Fork 3
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
"methods whose bodies are too close to one another"? #5
Comments
Update: The work-around did not succeed. Will try to gather further information. |
A further update: After restarting Windows, the problem went away. The person who observed the bug is pretty sure that this happened once before, as well -- a reboot fixed it, but then it recurred. |
Mhm, all this is very strange. Furthermore, I've only ever observed errors due to close method bodies on methods of a same class. I'll look into it. |
Do you use the lightweight version (or the full version, if you don't mind recompiling it)? If so, can you try moving these lines below those ones? I suspect none of the methods have been jitted yet, and thus point to temporary memory locations that might be close to one another. Alternatively, you can try invoking your |
I will try all those things if/when the problem recurs. As of right now, rebooting the system apparently fixed it, but my coworker will definitely reach out to me if it starts happening again. I also made a test application for him to run that fully annotates all values and the logic flow within the |
Okay, so hopefully we get to the bottom of this. But this kind of behavior makes me wonder how exactly I have control over it... |
I have a project where I am patching a bug in the WPF TreeView class by replacing one of its non-public methods with my own implementation. I am installing this "shim" with the following code:
This has been working fine on a variety of workstations for several months, but a co-worker's machine just the other day started throwing this exception:
https://github.com/6A/Ryder/blob/master/Ryder.Lightweight/Ryder.Lightweight.cs#L61
To get things working for now, I am going to try a bit of an ugly work-around: I will make two identical copies of my shim method, and if one of them is too close, then in theory it should be impossible for the other one to also be too close (even if it is a trampoline). But, I'm trying to understand why:
a) this works fine on many other machines,
b) it just stopped working on this particular machine where it was working before, and
c) how methods in different classes can have entrypoints less than 13 bytes apart.
What is the correct fix in this situation??
The text was updated successfully, but these errors were encountered: