[Pixman] [PATCH] Check for NEON using a signal handler to catch SIGILL
mj.mccormack at samsung.com
Thu Dec 9 04:36:15 PST 2010
I have run into a problem with pixman's CPU detection code under QEMU ARM.
When trying to run an executable linked with pixman under QEMU, I get a crash like this:
21553 open("/proc/self/auxv",O_RDONLY) = 3
21553 read(3,0x7ffdb0,8) = 8
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Exit reason and status: signal 11
/proc/self/auxv is from the host x86 kernel, not an ARM kernel, as pixman expects.
Parsing /proc/self/auxv will only work on Linux with proc mounted, and not under QEMU.
The attached patch modified pixman/pixman-cpu.c to use a more direct method of
detecting the CPU capabilities (i.e. trying to run a NEON instruction)
This prevents pixman from crashing under QEMU, and detects NEON correctly on
an ARMv7 target.
More information about the Pixman