Skip to content

[release/6.0-rc2][wasm][debugger] Fix reuse buffer - #59775

Merged
mmitche merged 1 commit into
dotnet:release/6.0-rc2from
thaystg:thays_fix_reuse_buffer
Sep 30, 2021
Merged

[release/6.0-rc2][wasm][debugger] Fix reuse buffer#59775
mmitche merged 1 commit into
dotnet:release/6.0-rc2from
thaystg:thays_fix_reuse_buffer

Conversation

@thaystg

@thaystgthaystg commented Sep 29, 2021

Copy link
Copy Markdown
Member

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.

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

Copy link
Copy Markdown

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:-

@lewinglewing 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-rc2September 29, 2021 23:10
@lewinglewing changed the title [release/6.0][wasm][debugger] Fix reuse buffer[release/6.0-rc2][wasm][debugger] Fix reuse bufferSep 29, 2021
@lewing

Copy link
Copy Markdown
Member

Retargeted to rc2 and approved per email discussion.

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

Copy link
Copy Markdown
Member

/azp run runtime

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@lewing

Copy link
Copy Markdown
Member

cc @Anipik

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

Labels

arch-wasmWebAssembly architecturearea-Debugger-monoServicing-approvedApproved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@thaystg@lewing@mmitche