[2020-02] [mono][loader] Set status on success; avoid mmap on Android#21610
Merged
akoeplinger merged 2 commits into2020-02from Jan 26, 2023
Merged
[2020-02] [mono][loader] Set status on success; avoid mmap on Android#21610akoeplinger merged 2 commits into2020-02from
akoeplinger merged 2 commits into2020-02from
Conversation
Manual backport of dotnet/runtime#80949 to mono/mono Emebedders that call `mono_assembly_load_from_full` may observe a non-NULL return value and an uninitialized MonoImageOpenStatus, which may lead to incorrect diagnostics in code like: ``` MonoImageOpenStatus status; MonoAssembly *assembly = mono_assembly_load_from_full (image, name, status, refonly); if (!assembly || status != MONO_IMAGE_OK) { fprintf(stderr, "Failure due to: %s\n", mono_image_strerror (status)); abort(); } ``` Which will print `Failure due to: Internal error` Addresses dotnet/android#7658
Avoid an mmap that will fail since Android uses a custom loader and the assemblies aren't on disk
Member
|
/cc @akoeplinger |
Member
|
@monojenkins build |
akoeplinger
approved these changes
Jan 25, 2023
jonpryor
added a commit
to jonpryor/xamarin-android
that referenced
this pull request
May 19, 2023
Fixes: dotnet#7658 Changes: mono/mono@6dd9def...73df89a * mono/mono@73df89a73d2: Fix xar url again * mono/mono@36fd1837d0d: Switch back to original xar version * mono/mono@5bbc709e5dc: Fix xar download url * mono/mono@3cb47d8b4dc: [mono] Use `unsigned char` when computing UTF8 string hashes (mono/mono#21633) * mono/mono@a102a350e53: [2020-02] [mono][loader] Set status on success; avoid mmap on Android (mono/mono#21610) * mono/mono@74f85c2ac33: Fix url to gtksharp msi * mono/mono@2f7d584ad2b: Fix build on macOS 13 / Xcode 14 (mono/mono#21597) * mono/mono@03b09960787: Disable a failing test
jonpryor
added a commit
to dotnet/android
that referenced
this pull request
May 25, 2023
Fixes: #7658 Changes: mono/mono@6dd9def...73df89a * mono/mono@73df89a73d2: Fix xar url again * mono/mono@36fd1837d0d: Switch back to original xar version * mono/mono@5bbc709e5dc: Fix xar download url * mono/mono@3cb47d8b4dc: [mono] Use `unsigned char` when computing UTF8 string hashes (mono/mono#21633) * mono/mono@a102a350e53: [2020-02] [mono][loader] Set status on success; avoid mmap on Android (mono/mono#21610) * mono/mono@74f85c2ac33: Fix url to gtksharp msi * mono/mono@2f7d584ad2b: Fix build on macOS 13 / Xcode 14 (mono/mono#21597) * mono/mono@03b09960787: Disable a failing test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #21609 to 2020-02
/cc @lambdageek
Customer Impact
Customers using Xamarin Android may experience sporadic crashes at app startup or during assembly loading due to an uninitialized variable.
Testing
Manual testing
Risk
Low. We now initialize the variable.
IMPORTANT: Is this backport for a servicing release? If so and this change touches code that ships in a NuGet package, please make certain that you have added any necessary package authoring and gotten it explicitly reviewed.