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

[mono][wasm] Refactor mono_fixup_symbol_name #101681

Merged
merged 12 commits into from May 9, 2024

Conversation

mkhamoyan
Copy link
Member

@mkhamoyan mkhamoyan commented Apr 29, 2024

This PR is a follow up for #101106

  • Refactor mono_fixup_symbol_name to handle properly leaking the memory
  • Apply same logic for all platforms

Copy link
Contributor

Tagging subscribers to this area:
See info in area-owners.md if you want to be subscribed.

@mkhamoyan mkhamoyan added the arch-wasm WebAssembly architecture label Apr 29, 2024
Copy link
Member

@lambdageek lambdageek left a comment

Choose a reason for hiding this comment

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

  1. important Don't return the address of a stack-allocated temporary.
  2. Avoid C standard string manipulation functions that don't take a buffer length (like strcpy). Consider using GString from eglib instead.
  3. Remove some of the duplicated logic about which characters are copied, which ones replaced by _ and which ones are encoded in hex.

src/mono/mono/metadata/native-library.c Outdated Show resolved Hide resolved
src/mono/mono/metadata/native-library.c Outdated Show resolved Hide resolved
src/mono/mono/mini/aot-compiler.c Outdated Show resolved Hide resolved
src/mono/mono/mini/aot-compiler.c Outdated Show resolved Hide resolved
src/mono/mono/mini/mini-llvm.c Outdated Show resolved Hide resolved
src/mono/mono/metadata/native-library.c Outdated Show resolved Hide resolved
src/mono/mono/metadata/native-library.c Outdated Show resolved Hide resolved
src/mono/mono/metadata/native-library.c Outdated Show resolved Hide resolved
src/mono/mono/metadata/native-library.c Outdated Show resolved Hide resolved
@mkhamoyan mkhamoyan marked this pull request as ready for review May 6, 2024 15:23
@mkhamoyan mkhamoyan requested a review from thaystg as a code owner May 6, 2024 15:23
@mkhamoyan mkhamoyan requested a review from akoeplinger May 6, 2024 15:23
Copy link
Member

@akoeplinger akoeplinger left a comment

Choose a reason for hiding this comment

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

One comment, LGTM otherwise

src/mono/mono/mini/aot-compiler.c Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants