From: https://bugzilla.redhat.com/show_bug.cgi?id=435771 On a PPC without Altivec, the Altivec detection causes a SIGILL, but crashes when run as part of GStreamer's plugins cache rebuild, with the libvisual plugins installed. " This works... int main(void) { visual_cpu_initialize(); oil_init(); return 0; } ... and this doesn't... int main(void) { oil_init(); visual_cpu_initialize(); return 0; } I blame liboil, for leaving SIGILL blocked. "
I can provide an account on a suitable machine without Altivec, if that's helpful.
I recommend replacing the SIGILL-based Altivec check with the one at https://bugzilla.redhat.com/show_bug.cgi?id=435771#c21
Created attachment 15033 [details] [review] liboil-better-altivec-detect.patch Untested patch, based on David Woodhouse's code in the RH bugzilla.
Created attachment 15034 [details] [review] liboil-better-altivec-detect.patch And the same one but that actually compiles.
Looks good. Catching SIGILL cleanly is still important for other reasons, though, so I'd appreciate any help getting that fixed.
Any reason why /proc/self/auxv wouldn't work?
(In reply to comment #6) > Any reason why /proc/self/auxv wouldn't work? None that I can think of. Running a binary compiled for Linux under a non-Linux system in emulation? Or running a PPC binary in qemu-ppc? :) Correction: None that I can think of and care about. And it'll fail safe in those cases anyway, assuming no Altivec. Why else do you need to catch SIGILL? Mucking with signal handlers from libraries is best avoided if possible, surely?
Ok, /proc/self/auxv it is. Liboil turns on the SIGILL handler because occasionally implementations get tagged with the wrong flags. This is much more of a concern on x86, with N different CPU flags and M different CPUs, some of which don't *exactly* correspond to the flags. It's not supposed to ever be triggered. In any case, the current SIGILL trapping code works correctly multiple times on x86-linux, so one would expect this should also be the case on powerpc-linux. Or maybe not. commit df0e54862b788e44e4bc21fab4c10032be664056 Author: David Schleef <ds@ginger.bigkitten.com> Date: Thu Mar 13 00:23:21 2008 -0700 Use /proc/self/auxv to test for altivec on Linux. Patch from #14914
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.