-
Notifications
You must be signed in to change notification settings - Fork 249
Can Method::DoesTryHandlerPointToOffset
ever return true?
#757
Comments
At the moment, I'm just looking for a sanity check here. If there were a Slack channel (which I am told does send alerts to the phone app) rather than a dusty and dying gitter, I would have asked there. |
I did look at slack and I use it all the time but it is invite only AFAIK so it isn't very community friendly - I may have another look and see if we can make the process better |
Back on topic -- Having pondered it overnight, it didn't seem to make sense to put/leave the instrumentation after a
the results were, as expected, identical and successful. I suspect the answer to my question that forms the topic title is that it would do so only by coincidence, and in any case that it shouldn't. For the record, the IL generated by the 14.0 compiler with the given settings is slightly different to that quoted above (which was standard release build in VS2017 v15.3.2)
with a different handle for the |
My Framework
My Environment
I have already...
My issue is related to (check only those which apply):
Expected Behavior
I can write a unit test based on the sample code in issue #663 to exercise what is currently the drop-through branch of
Method::InsertInstructionsAtOriginalOffset
-- having some real live IL for which the test condition, to witis true for some
ExceptionHandler *i
-- though the use ofm_operand
looked suspicious from the start.Actual Behavior
Building the sample code from issue #663 in release configuration and then unpacking with ILDASM, I created the following stub test
Debugging through this I see that, as I quite suspected, I have one exception handler record with
i->m_handlerStart->m_operation == CEE_THROW
buti->m_handlerStart->m_operand == 0
; andMethod::DoesTryHandlerPointToOffset
returns false again.Steps to reproduce the problem:
As above. I expect this to be a simple typo, probably induced by "helpful" autocompletion.
The text was updated successfully, but these errors were encountered: