Skip to content

[wasm][debugger] Fix stepping out from an async method - #42227

Merged
lewing merged 2 commits into
dotnet:masterfrom
thaystg:thays_fix_41973
Sep 15, 2020
Merged

lewing merged 2 commits into
dotnet:masterfrom
thaystg:thays_fix_41973

Conversation

@thaystg

@thaystg thaystg commented Sep 14, 2020 •

Copy link
Copy Markdown
Member

Stepping out from an async method fails with:

: /Users/radical/dev/runtime/src/mono/mono/mini/mini-wasm-debugger.c:248 <disabled>

.. which corresponds to g_error ("set_set_notification_for_wait_completion_flag");

Move some functions from debugger-agent to debugger-engine, which will make the proper implementation of set_set_notification_for_wait_completion_flag available for use in mini-wasm-debugger.c.

Fixes #41973.

@Dotnet-GitSync-Bot

Copy link
Copy Markdown
Collaborator

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@radical

radical commented Sep 14, 2020

Copy link
Copy Markdown
Member

IIUC, this is needed as you are fixing issue #41973 .
So, maybe the title should be changed to: [wasm][debugger] Move some functions from debugger-agent to debugger-engine

And description to:

This will make them usable from mini-wasm-debugger. This needed for fixing #41973.

@radical

radical commented Sep 15, 2020

Copy link
Copy Markdown
Member

Build failing with:

  /__w/1/s/src/mono/mono/mini/debugger-agent.c:714:20: error: static declaration of 'get_notify_debugger_of_wait_completion_method' follows non-static declaration
  static MonoMethod* get_notify_debugger_of_wait_completion_method (void);
                     ^
  /__w/1/s/src/mono/mono/mini/debugger-engine.h:325:13: note: previous declaration is here
  MonoMethod* get_notify_debugger_of_wait_completion_method (void);
              ^
  1 error generated.

@thaystg thaystg changed the title [wasm][debugger] Fix assert when calling set_set_notification_for_wait_completion_flag [wasm][debugger] Move some functions from debugger-agent to debugger-engine Sep 15, 2020
@thaystg

thaystg commented Sep 15, 2020

Copy link
Copy Markdown
Member Author

Changed the description and fixed the compilation error.
Thanks, @radical

@thaystg

thaystg commented Sep 15, 2020

Copy link
Copy Markdown
Member Author

@lewing should we backport?

@radical

radical commented Sep 15, 2020

Copy link
Copy Markdown
Member

re:backport, maybe we should wait till we have the full fix for the issue.

@thaystg

thaystg commented Sep 15, 2020 •

Copy link
Copy Markdown
Member Author

What would be the full fix? The variables that you are working on?

@radical

radical commented Sep 15, 2020

Copy link
Copy Markdown
Member

Oh, sorry, I just looked at the issue again. This is the full fix 😬 I thought that this was stuff needed in support of an upcoming fix!
We need to add tests for this.

@radical radical changed the title [wasm][debugger] Move some functions from debugger-agent to debugger-engine [wasm][debugger] Fix stepping out from an async method Sep 15, 2020

@lewing lewing left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks good but could use a test.

@thaystg

thaystg commented Sep 15, 2020

Copy link
Copy Markdown
Member Author

I will add a test, but didn't add yet, because I think that we should merge it fast to be able to merge on RC2. So I was planning to add the test in another PR.

@lewing
lewing merged commit dabaa7b into dotnet:master Sep 15, 2020
@thaystg

thaystg commented Sep 15, 2020

Copy link
Copy Markdown
Member Author

/backport to release/5.0-rc2

@github-actions

Copy link
Copy Markdown
Contributor

thaystg added a commit that referenced this pull request Sep 17, 2020
thaystg added a commit that referenced this pull request Sep 18, 2020
* Adding the test I realized that I need to move one more function.

* Adding line.

* Adding space.
monojenkins pushed a commit to monojenkins/mono that referenced this pull request Sep 19, 2020
Adding the test I realized that I need to move one more function.
thaystg added a commit to mono/mono that referenced this pull request Sep 22, 2020
Adding the test I realized that I need to move one more function.

Co-authored-by: thaystg <[email protected]>
Co-authored-by: Thays <[email protected]>
lewing pushed a commit that referenced this pull request Sep 22, 2020
…hod (#42263)

* Fix assert when calling set_set_notification_for_wait_completion_flag

* Fix compilation error.

* Merging #42299 to backport together with #42227.

Co-authored-by: Thays Grazia <[email protected]>
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[wasm][debugger] Crash/assert when stepping out from an async method

4 participants