Summary: | SIGILL caused by libcairo when running gnome-terminal | ||
---|---|---|---|
Product: | pixman | Reporter: | Sebastien Bacher <seb128> |
Component: | pixman | Assignee: | Billy Biggs <billy.biggs> |
Status: | RESOLVED FIXED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | high | CC: | billy.biggs, cworth, utx |
Version: | 0.1.3 | ||
Hardware: | x86 (IA32) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Proposed patch |
Description
Sebastien Bacher
2005-09-10 09:13:38 UTC
What's the output of /proc/cpuinfo? The upstream user has an AMD-K6 which supports MMX/3DNow but not SSE. The problem is that using -msse causes gcc to generate SSE instructions in the CPU detection routine (fbHasMMX). The gcc documentation is rather misleading on this point. The current documentation states that these options (-mmmx, -msse) enable use of the compiler built-ins, and not that it allows gcc to generate MMX/SSE code. I have filed this bug upstream with gcc: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23809 Unfortunately, the fix is not as simple as removing the -msse. We need to isolate the MMX/SSE code in a separate file from the runtime detection code if we intend to keep using the compiler intrinsics. Paul Brook on #gcc confirmed the bad news. Looks like this came up before, with a patch, and I guess it didn't make it (or made it into Xorg but not xserver/pixman?). http://lists.freedesktop.org/pipermail/xorg/2005-July/008782.html do you have a fix for this bug? I would like to get cairo fixed for Ubuntu before the 5.10 version I'll try and put together a final patch tonight. Created attachment 3291 [details] [review] Proposed patch Here's what I intend to commit. otaylor and cworth, OK for 1.0.2? There's actually one other issue not addressed by this patch. The MMX code is currently being compiled with both -mmmx and -msse. The detection code seems to only check for MMX, not full SSE, so I think this is a problem. I see three possible solutions: 1. Change the detection code to check for SSE, giving up on pre-SSE chips, and turn on the USE_SSE define in fbmmx.c. 2. Compile fbmmx.c twice, once for MMX and once for SSE. 3. Modify cairo's configure.in to drop -msse For 1.0.2 I think the only option is 3, as the other two are more risky and I'd hate to cause new SIGILLs, but I'm confused about why -msse was in there at all. Maybe for futureproofing the USE_SSE code? The current code seems to compile fine without it. Am I missing something? Looks fine for me, assuming the obvious Makefile.am changes. The Makefile.am already only applies the MMX flags to the fbmmx.* code. Was this what you meant? Oh, for some reason I thought your patch moved stuff into a new file rather than into fbpict.c, so would have required Makefile.am changes. Moving it into fbpict.c should be OK. Fixing accidental reassignment. Looks fine to me, (just having read it, not tested). I assume you've tested, so please commit. I tested as well as I could, I don't have access to a non-SSE supporting CPU. Fix committed to both the 1.0 branch and HEAD. Fix applied to xserver/fb (but it doesn't really help yet, see bug 4501). *** Bug 5465 has been marked as a duplicate of this bug. *** |
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.