Commit 0aad863
authored
[loader] Set status on success (#80949)
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#76581 parent 2f2215f commit 0aad863
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2024 | 2024 | | |
2025 | 2025 | | |
2026 | 2026 | | |
| 2027 | + | |
| 2028 | + | |
2027 | 2029 | | |
2028 | 2030 | | |
2029 | 2031 | | |
| |||
0 commit comments