Skip to content

Hybrid AOT doesn't work on arm64 device if built with only armv7 architecture selected #1218

@Belorus

Description

@Belorus

Steps to Reproduce

  1. Create and Empty application
  2. Add <AndroidAotMode>Hybrid</AndroidAotMode> to .csproj
  3. Add <AotAssemblies>true</AotAssemblies> to .csproj

Repro

Expected Behavior

It works

Actual Behavior

It crashes

Version Information

Microsoft Visual Studio Professional 2017
Version 15.5.2
VisualStudio.15.Release/15.5.2+27130.2010
Microsoft .NET Framework
Version 4.7.02046

Installed Version: Professional

Xamarin 4.8.0.753 (6575bd113)
Xamarin.Android SDK 8.1.0.25 (HEAD/d8c6e504f)

Log File

hybridAOT.log

Other

In logs there are warnings like
W linker : /data/app/App1.App1-1/lib/arm/libaot-mscorlib.dll.so: is missing DT_SONAME will use basename as a replacement: "libaot-mscorlib.dll.so"

F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x25f44a4c in tid 12103 (App1.App1)

01-22 20:27:13.783 12150 12150 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-22 20:27:13.784 12150 12150 F DEBUG   : Build fingerprint: 'samsung/heroltexx/herolte:7.0/NRD90M/G930FXXS1DQLC:user/release-keys'
01-22 20:27:13.784 12150 12150 F DEBUG   : Revision: '8'
01-22 20:27:13.785 12150 12150 F DEBUG   : ABI: 'arm'
01-22 20:27:13.785 12150 12150 F DEBUG   : pid: 12103, tid: 12103, name: App1.App1  >>> App1.App1 <<<
01-22 20:27:13.785 12150 12150 F DEBUG   : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x25f44a4c
01-22 20:27:13.785 12150 12150 F DEBUG   :     r0 00000000  r1 ffe674f4  r2 25f44a74  r3 d9f225f0
01-22 20:27:13.786 12150 12150 F DEBUG   :     r4 00000000  r5 e43f7f28  r6 ffe67908  r7 ffe674ec
01-22 20:27:13.786 12150 12150 F DEBUG   :     r8 d9f225f0  r9 d5a54690  sl ffe67a10  fp ffe67508
01-22 20:27:13.786 12150 12150 F DEBUG   :     ip ffe67494  sp 25f44a5c  lr d9f229c8  pc c64000c0  cpsr 600e0010
01-22 20:27:13.788 12150 12150 F DEBUG   : 
01-22 20:27:13.788 12150 12150 F DEBUG   : backtrace:
01-22 20:27:13.788 12150 12150 F DEBUG   :     #00 pc 001200c0  /data/app/App1.App1-1/lib/arm/libmonosgen-2.0.so

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: Mono RuntimeMono-related issues: BCL bugs, AOT issues, etc.need-attentionA xamarin-android contributor needs to review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions