Skip to content

Conversation

@AntonLapounov
Copy link
Contributor

@AntonLapounov AntonLapounov commented Apr 3, 2021

The ARM version was logically correct; however, its text was badly broken. The ARM64 version had a number of logical issues:

  • The Xdata parameter was typed incorrectly (the code would not compile).
  • An incorrect shift amount (27 instead of 22) was used to check whether the extension word is present. That contradicted the textual description.
  • An incorrect mask (0x0f instead of 0x1f) was used to extract the 5-bit UnwindWords field. That caused losing the most significant bit of UnwindWords and returning an incorrect size for .xdata records containing from 61 to 124 unwind byte codes.
  • Checking the E bit was missing.

See the implementation of the RtlpUnwindFunctionFull OS function for the source of truth.

@PRMerger18
Copy link
Contributor

@AntonLapounov : Thanks for your contribution! The author(s) have been notified to review your proposed change.

Copy link
Contributor

@colin-home colin-home left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AntonLapounov The code in ARM exception handling looked like the victim of a global search and replace gone badly wrong. Thanks for the fixes.

@colin-home colin-home merged commit afad7ce into MicrosoftDocs:master Apr 3, 2021
@AntonLapounov AntonLapounov deleted the FixComputeXdataSizeSamples branch April 3, 2021 02:37
@AntonLapounov
Copy link
Contributor Author

Thank you for the super-fast approval!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants