[wasm][debugger] Fixing step over in an async method#42639
[wasm][debugger] Fixing step over in an async method#42639thaystg merged 2 commits intodotnet:masterfrom
Conversation
|
Tagging subscribers to this area: @thaystg |
| if (ss_args->ctx && !frames) { | ||
|
|
||
| #else | ||
| if (!frames) { |
There was a problem hiding this comment.
Why was this causing the issue with the test? Why did it specifically break the async test?
There was a problem hiding this comment.
Because once it doesn't execute ss_calculate_framecount because ss_args->ctx == NULL, nframes variable would be 0, and wouldn't enter in this if: if (asyncMethod && asyncMethod->num_awaits && nframes && rt_callbacks.ensure_jit (frames [0])) { and wouldn't call ss_bp_add_one
There was a problem hiding this comment.
Okay. nframes ==0 would also cause the loop starting line 1341 to get skipped, IIUC. Is there any case where that loop will get incorrectly skipped?catch`(not the last one, IIUC) in an async method? Or catch in non-async methods?
Just trying to understand with silly/naive questions 😬
There was a problem hiding this comment.
I think this loop would be skipped wrongly without the fix. Now the value of nframes and frames variables will be correct for both loops, line 1341 and line 1358.
|
I'm seeing some failures on the locally. @thaystg can you verify? |
|
Looks like the issue is that #42486 fails to handle null strings in on of the versions of |
|
debugger test regressions fixed in #42658 |
|
@steveisok still getting cancellations we can't clear |
|
/backport to release/5.0-rc2 |
|
Started backporting to release/5.0-rc2: https://github.com/dotnet/runtime/actions/runs/271123075 |
|
@thaystg backporting to release/5.0-rc2 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Fixing step over in an async method.
error: sha1 information is lacking or useless (src/mono/mono/mini/debugger-engine.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Fixing step over in an async method.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
We don't have ctx available on wasm, but we don't need it to calculate the frames, the ifdef on debugger-engine.h fix the #42424.