You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Android] Segmentation fault in libcoreclr.so #11661
Hi, after followed this tutorial https://github.com/qmfrederik/coredroid, I got a lot of binaries successfull. I pushed them to Android /data/local/tmp/ and try to run a HelloWorld sample. It doesn't show "Hello, world" but gives me a "segmentation fault in libcoreclr.so".
I am not aware of any prebuilt binaries availability. Have you tried to run it under lldb as the tutorial describes? That could give us some idea on what's wrong.
I cannot build the master branch cause it keeps reporting "cannot find version.cpp" error, even if 'skipgenerateversion' argument is present, so I switch to release/2.2.
I can build v2.2 successfully, and run it under lldb, I got the following information:
It looks like there is a relocation in the libcoreclr.so and that is not allowed on Android. We used to have such an issue in the past, but at that time, the dynamic loader was not crashing with SIGSEGV, but rather showing "dlopen failed to open the libcoreclr.so with error dlopen failed: text relocations (DT_TEXTREL) found in 64-bit ELF file "/data/data/com.termux/files/usr/bin/Product/Linux.arm64.Debug/libcoreclr.so".
Since we use -fPIC option when building coreclr, my guess is that some newly added / modified assembler helper is responsible for that.
@yanzhenms I am going to try it on my local Android device. I was actually able to build it from the master branch, the thing was to actually not to pass in the skipgenerateversion. This option seems to be broken for crossgen build now.
But I needed to update the cross/build-android-rootfs.sh due to the fact that libicu and liblzma package versions were updated.
Activity
janvorli commentedon Dec 13, 2018
I am not aware of any prebuilt binaries availability. Have you tried to run it under lldb as the tutorial describes? That could give us some idea on what's wrong.
yanzhenms commentedon Dec 18, 2018
I cannot build the master branch cause it keeps reporting "cannot find version.cpp" error, even if 'skipgenerateversion' argument is present, so I switch to release/2.2.
I can build v2.2 successfully, and run it under lldb, I got the following information:
janvorli commentedon Dec 18, 2018
It looks like there is a relocation in the libcoreclr.so and that is not allowed on Android. We used to have such an issue in the past, but at that time, the dynamic loader was not crashing with SIGSEGV, but rather showing "dlopen failed to open the libcoreclr.so with error dlopen failed: text relocations (DT_TEXTREL) found in 64-bit ELF file "/data/data/com.termux/files/usr/bin/Product/Linux.arm64.Debug/libcoreclr.so".
Since we use -fPIC option when building coreclr, my guess is that some newly added / modified assembler helper is responsible for that.
janvorli commentedon Dec 21, 2018
@yanzhenms I am going to try it on my local Android device. I was actually able to build it from the master branch, the thing was to actually not to pass in the
skipgenerateversion. This option seems to be broken for crossgen build now.But I needed to update the
cross/build-android-rootfs.shdue to the fact that libicu and liblzma package versions were updated.