Skip to content

Commit 32ddcb8

Browse files
Bret Johnsonjonpryor
authored andcommitted
[Xamarin.Android.Build.Tasks] Preserve set_ShadowCopyDirectories (#803)
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=59115 `monodroid_create_appdomain()` requires that the `AppDomainSetup.set_ShadowCopyDirectories` property exist, so that it can be called. Unfortunately, the linker may remove this property, which results in a SIGSEGV if it's been removed: C [libmonosgen-2.0.dylib+0x20bc9c] mono_property_set_value+0xc C [libmono-android.debug.dylib+0x154fe] monodroid_property_set+0xbe C [libmono-android.debug.dylib+0x15268] monodroid_create_appdomain+0x248 C [libmono-android.debug.dylib+0xf159] create_domain+0x149 C [libmono-android.debug.dylib+0xe439] create_and_initialize_domain+0x69 C [libmono-android.debug.dylib+0xe89d] Java_mono_android_Runtime_createNewContext+0x7d Add `AppDomainSetup.set_ShadowCopyDirectories` to the linker's preserve list, so that the Android Designer can work as intended.
1 parent 79989b7 commit 32ddcb8

File tree

1 file changed

+1
-0
lines changed
  • src/Xamarin.Android.Build.Tasks/Linker/PreserveLists

1 file changed

+1
-0
lines changed

src/Xamarin.Android.Build.Tasks/Linker/PreserveLists/mscorlib.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
<type fullname="System.AppDomainSetup" preserve="fields">
1818
<method name="set_ShadowCopyFiles" />
19+
<method name="set_ShadowCopyDirectories" />
1920
</type>
2021
<type fullname="System.AppDomainUnloadedException" />
2122
<type fullname="System.ApplicationException" />

0 commit comments

Comments
 (0)