I wonder if anyone has any clue as to why androidN...
# kotlin-native
n
I wonder if anyone has any clue as to why androidNative executables don't work. I have a hello world executable that segfaults. Android logcat shows
Copy code
2021-10-04 21:47:44.065 0-0/? I/playground2.so[20392]: segfault at 0 ip 00000000f52ce047 sp 00000000ffe03130 error 6 in playground2.so[f52ce000+143000]
2021-10-04 21:47:44.068 0-0/? I/Code: 00 00 00 d8 3e 2d 00 00 00 00 00 34 00 20 00 08 00 28 00 28 00 27 00 06 00 00 00 34 00 00 00 34 00 00 00 34 00 00 00 00 01 00 <00> 00 01 00 00 04 00 00 00 04 00 00 00 01 00 00 00 00 00 00 00 00
I'm not experienced in native development, but none of my attempts led anywhere - addr2line gives ??, malloc debugging (here) does nothing. I managed to get a linux core dump and fed it to lldb, but I'm not able to get any information from it. The same code works perfectly when compiled as a shared library. Any clue on how to dig deeper before filing an issue?
lldb trace, x86:
Copy code
* thread #1, name = 'playground2.so', stop reason = signal SIGSEGV
  * frame #0: 0xf52ce047 playground2.so

->  0xf52ce047: addb   %al, (%eax)
    0xf52ce049: addl   %eax, (%eax)
    0xf52ce04b: addb   %al, (%eax,%eax)
    0xf52ce04e: addb   %al, (%eax)
    0xf52ce050: addb   $0x0, %al
    0xf52ce052: addb   %al, (%eax)
    0xf52ce054: addl   %eax, (%eax)
    0xf52ce056: addb   %al, (%eax)
    0xf52ce058: addb   %al, (%eax)
    0xf52ce05a: addb   %al, (%eax)
    0xf52ce05c: addb   %al, (%eax)
    0xf52ce05e: addb   %al, (%eax)
    0xf52ce060: addb   %al, (%eax)
    0xf52ce062: addb   %al, (%eax)
    0xf52ce064: aam    $0x24