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

[release/9.0] Fix CET debugger stepping over CALL instructions #108872

Merged

Conversation

tommcdon
Copy link
Member

Backport of #108809 to release/9.0

Customer Impact

  • Customer reported
  • Found internally

This fix addresses CET stepping issues found while testing .NET 9 apps under the debugger.

  1. Resuming from a breakpoint on a CALL instruction triggers a CET failure, often seen as 0xc0000409 or Fail Fast. This can be reproduced by attempting to step through optimized code, such as a Ready-To-Run method.
  2. Func-eval abort resulted in the process AV'ing.

Regression

  • Yes
  • No

Although the issue pre-exists, .NET 9 ships with CET enabled by default which will drastically increase the likelihood of customers encountering this issue..

Testing

VS Debugger validation. Manual validation stepping over call instructions, both with and without breakpoints set on them.

Risk

Medium-Low. It is a medium-sized code change but we have mitigated that risk by constraining the fix to a very narrow scenario which would result in a program crash without the fix. We will only perform an in-place single-step when CET debugging is enabled -and- when resuming from breakpoints on CALL instructions.

Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

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

lgtm. please get a code review. we will take for consideration in 9 GA

@jeffschwMSFT jeffschwMSFT added the Servicing-consider Issue for next servicing release review label Oct 15, 2024
@jeffschwMSFT jeffschwMSFT added this to the 9.0.0 milestone Oct 15, 2024
Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Oct 15, 2024
@jeffschwMSFT jeffschwMSFT merged commit 066cfa7 into dotnet:release/9.0 Oct 15, 2024
10 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Nov 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants