-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Xamarin.Android.Build.Tasks] Fix native code generation when marshal…
… methods are disabled (#7899) Disabling marshal method generation via `$(AndroidEnableMarshalMethods)`=False turns off a lot of native code generation in the `MarshalMethodsNativeAssemblyGenerator` class, but the class is also responsible for outputting a correctly sized cache area (an array of *X* pointers) to be used by the native runtime to cache pointers to `MonoImage` instances. `libmonodroid.so` trusts that `Xamarin.Android.Build.Tasks.dll` et al will generate correct code, and thus does not verify the size of generated array. This trust, unfortunately, was broken because with marshal methods disabled, the native code generator created an output cache array that was 0 entries in size, thus leading to segfault when attempting to run the application. Fix the issue and also parametrize one of the on-device tests to be built twice, with marshal methods explicitly disabled and explicitly enabled.
- Loading branch information
Showing
5 changed files
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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