Skip to content

Conversation

@thaystg
Copy link
Member

@thaystg thaystg commented Sep 29, 2021

Backport of #59773 to release/6.0

When the wasm linear memory has to grow it invalidates existing views into the heap. To avoid this issue make sure to always create a new view into the heap for the debugger command immediately before use.

Customer Impact

Debugging will eventually fail once the runtime allocates enough memory to require growing the Wasm memory buffer.

Testing

Tested manually on Blazor
Tested on debugger-tests

Risk

Low risk, it's reseting the _debugger_heap_bytes always before the usage to avoid using an invalid pointer in the case that Module.HEAPU8.buffer is reallocated.

@thaystg thaystg added arch-wasm WebAssembly architecture area-Debugger-mono labels Sep 29, 2021
@thaystg thaystg requested a review from lewing September 29, 2021 19:38
@ghost
Copy link

ghost commented Sep 29, 2021

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #59773 to release/6.0

Customer Impact

Debugger is not working from VS.

Testing

Tested manually on Blazor
Tested on debugger-tests

Risk

Low risk, it's reseting the _debugger_heap_bytes always before the usage to avoid using an invalid pointer in the case that Module.HEAPU8.buffer is reallocated.

Author: thaystg
Assignees: -
Labels:

arch-wasm, area-Debugger-mono

Milestone: -

@lewing lewing added the Servicing-consider Issue for next servicing release review label Sep 29, 2021
@lewing lewing changed the base branch from release/6.0 to release/6.0-rc2 September 29, 2021 23:10
@lewing lewing changed the title [release/6.0][wasm][debugger] Fix reuse buffer [release/6.0-rc2][wasm][debugger] Fix reuse buffer Sep 29, 2021
@lewing
Copy link
Member

lewing commented Sep 29, 2021

Retargeted to rc2 and approved per email discussion.

@lewing lewing added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 29, 2021
@lewing
Copy link
Member

lewing commented Sep 29, 2021

/azp run runtime

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lewing
Copy link
Member

lewing commented Sep 29, 2021

cc @Anipik

@mmitche mmitche merged commit f582a40 into dotnet:release/6.0-rc2 Sep 30, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Nov 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

arch-wasm WebAssembly architecture area-Debugger-mono Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants