Skip to content
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

[wasm][debugger] Fix calling multiple times mono_wasm_asm_loaded when webcil is enabled #87026

Conversation

thaystg
Copy link
Member

@thaystg thaystg commented Jun 1, 2023

The comparison was considering that the extension always had 4 characteres like ".dll" or ".exe" which is not true when webcil is enabled and the extension is ".wasm".

@thaystg thaystg requested review from lewing and lambdageek June 1, 2023 20:08
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 1, 2023
@ghost ghost assigned thaystg Jun 1, 2023
@danmoseley danmoseley added arch-wasm WebAssembly architecture area-Diagnostics-mono and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jun 1, 2023
@ghost
Copy link

ghost commented Jun 1, 2023

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

Issue Details

The comparison was considering that the extension always had 4 characteres like ".dll" or ".exe" which is not true when webcil is enabled and the extension is ".wasm".

Author: thaystg
Assignees: thaystg
Labels:

arch-wasm, area-Diagnostics-mono

Milestone: -

Comment on lines 221 to 224
while (entry != NULL) {
int entry_name_minus_extn_len = strlen(entry->assembly.name) - 4;
int entry_name_minus_extn_len = strlen(entry->assembly.name);
if (entry->assembly.name[entry_name_minus_extn_len - 4] == '.')
entry_name_minus_extn_len -= 4; //.dll (webcil disabled)
Copy link
Member

@lewing lewing Jun 1, 2023

Choose a reason for hiding this comment

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

maybe something like

int entry_name_minus_extn_len = entry->assembly.name - strrchr (entry->assembly.name, '.');

in case we ever use .webcil etc again.

@lewing lewing merged commit fc486b4 into dotnet:main Jun 2, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Diagnostics-mono
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants