Skip to content

[mono][debugger] Fix infinite recursion and null pointer access while debugging #73024

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

Merged
merged 5 commits into from
Aug 2, 2022

Conversation

thaystg
Copy link
Member

@thaystg thaystg commented Jul 28, 2022

  • IntPtr class in .net7 has a field called _value which points to itself so it was generating a recursive call.
  • Protect when jit_done is called from jit_failed because jinfo is NULL.

This is how we see IntPtr in the locals window:
image

@thaystg thaystg requested review from lewing, vargaz and lambdageek July 28, 2022 21:56
@thaystg thaystg requested a review from marek-safar as a code owner July 28, 2022 21:56
@ghost ghost added the area-Debugger-mono label Jul 28, 2022
@ghost ghost assigned thaystg Jul 28, 2022
@ghost
Copy link

ghost commented Jul 28, 2022

Tagging subscribers to this area: @thaystg
See info in area-owners.md if you want to be subscribed.

Issue Details
  • IntPtr class in .net7 has a field called _value which points to itself so it was generating a recursive call.
  • Protect when jit_done is called from jit_failed because jinfo is NULL.
Author: thaystg
Assignees: -
Labels:

area-Debugger-mono

Milestone: -

@thaystg
Copy link
Member Author

thaystg commented Jul 28, 2022

@lewing should we backport to .net7 preview 7?

@thaystg thaystg marked this pull request as draft July 28, 2022 22:32
@thaystg thaystg marked this pull request as ready for review July 29, 2022 01:06
@thaystg thaystg changed the title [android][debugger] Fix infinite recursion and null pointer access while debugging [mono][debugger] Fix infinite recursion and null pointer access while debugging Aug 1, 2022
@thaystg thaystg requested a review from radical as a code owner August 1, 2022 21:46
@radical
Copy link
Member

radical commented Aug 1, 2022

Just curious, how does it show up for the user? Does the IDE hang, or debugging is halted, or something else?

@thaystg
Copy link
Member Author

thaystg commented Aug 1, 2022

Just curious, how does it show up for the user? Does the IDE hang, or debugging is halted, or something else?

A stack overflow on runtime side because of the infinite recursion.

@thaystg thaystg merged commit b705ed9 into dotnet:main Aug 2, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Sep 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants