◐ Shell
clean mode source ↗

Message 265057 - Python tracker

This is due to something mysterious in Android's bionic & kernel. For the following C program:

#include <stdlib.h>
#include <signal.h>
#include <stdio.h>

int main()
{
    sigaction(SIGSEGV, NULL, NULL);
    raise(SIGSEGV);
    printf("Good evening!\n");
    return 0;
}

Compiled with: /opt/android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gcc test_sigsegv.c --sysroot /opt/android-ndk/platforms/android-21/arch-arm -fPIE -Wl,-pie
(Replace /opt/android-ndk to the path of NDK)

On ASUS ZE500KL:
shell@ASUS_Z00E_2:/data/local/tmp $ ./a.out
Good evening!

On Linux: (Compiled with gcc test_sigsegv.c)
$ ./a.out 
[2]    23434 segmentation fault (core dumped)  ./a.out

Seems the sigaction() call in Python occurs in Modules/signalmodule.c.