Bug 1709 - mesa_test_os_sse_exception_support fails inside gdb
Summary: mesa_test_os_sse_exception_support fails inside gdb
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: high normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-25 15:36 UTC by Moritz Muehlenhoff
Modified: 2006-05-22 16:12 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Backtrace of a debug run inside gdb (2.74 KB, text/plain)
2004-10-25 15:37 UTC, Moritz Muehlenhoff
Details
add IN_DRI_DRIVER Define into xc/lib/GL/mesa subdir where it is missing (4.99 KB, patch)
2005-11-19 15:25 UTC, Sérgio M. Basto
Details | Splinter Review

Description Moritz Muehlenhoff 2004-10-25 15:36:36 UTC
Hi, 
I'm using Debian sid with the DRI trunk builds provided by John Lightsey (the 
latest available build from 2004-09-26). I'm building an application using the 
Ogre 3D engine and encountered the problem that 
mesa_test_os_sse_exception_support() fails when running inside gdb. I'm not 
sure if that is a bug inside gdb or the DRI, but maybe it's possible to 
circumvent the problem inside the DRI. I'm attaching a backtrace. 
If anyone wants to debug this with the real code, please download the 
freebooters CVS module from https://gna.org/cvs/?group=freebooters and checkout 
the models module relative to the Freebooters main dir.
Comment 1 Moritz Muehlenhoff 2004-10-25 15:37:42 UTC
Created attachment 1164 [details]
Backtrace of a debug run inside gdb

The backtrace. BTW, I'm using gdb 6.1.
Comment 2 Sérgio M. Basto 2004-10-25 16:20:08 UTC
hi
Just a guess, I had one similar bug 
and recompile glut with Mesa - sources and the bug is gone 
Comment 3 Adam Jackson 2004-10-25 16:33:03 UTC
i strongly doubt this is a bug.  the whole point of mesa_test_os_sse_exception
is to generate an FPE to see how the OS handles it.

try saying "handle SIGFPE nostop" in gdb before running your application.  my
guess is it'll work just fine.
Comment 4 Ian Romanick 2004-10-25 16:34:56 UTC
It's not a bug in anything.  Just type 'cont', hit return, and be happy.  The
exception is just a side-effect of the way Mesa determines if the CPU and the OS
fully support SSE.
Comment 5 Moritz Muehlenhoff 2004-10-26 10:11:44 UTC
I see the point, but is there no gentler way to determine if the CPU has SSE 
support? I guess the current solution leads almost every programmer to believe 
something went wrong with his own code (and I guess there are very few setups 
that have built their X11 libs with debug symbols). 
Comment 6 Brian Paul 2004-10-26 10:31:18 UTC
I've added a comment on the _mesa_test_os_sse_support() function to tell
developers to just type 'continue' in gdb when the exception is caught.
Hopefully this will help people in the future.
Comment 7 Sérgio M. Basto 2005-11-19 15:25:55 UTC
Created attachment 3848 [details] [review]
add IN_DRI_DRIVER Define into xc/lib/GL/mesa subdir where it is missing

Ian Romanick has point that Mesa code should have IN_DRI_DRIVER Define, to
avoid mesa_test_os_sse_exception_support.
After analyze how build Mesa from CVS with "make linux-x86-dri" and how
xorg built same Mesa source with "make World"

So, I found on xc/lib/GL/mesa all subdirs: shader swrast tnl x86 main
math and tnl_dd have missing at least -DIN_DRI_DRIVER

Xorg build also misses -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DHAVE_ALIAS
Ian, and those ones are needed ?
Comment 8 Adam Jackson 2005-12-16 09:55:08 UTC
damnation, this should have been on the blocker list.
Comment 9 Adam Jackson 2005-12-16 10:40:56 UTC
withdrawn, far too late in the process now.
Comment 10 Alan Coopersmith 2005-12-21 09:40:12 UTC
Patch in attachment #3848 [details] [review] has been applied to Xorg monolith for inclusion in 6.9.
Comment 11 Sérgio M. Basto 2005-12-21 10:23:40 UTC
(In reply to comment #10)
> Patch in attachment #3848 [details] [review] [edit] has been applied to Xorg monolith for
inclusion in 6.9.

I would prefer that has been applied attachment #4069 [details] [review] from bug #5057 
because is more safety on files xc/lib/GL/mesa/main/Imakefile and
xc/lib/GL/mesa/x86/Imakefile 
use 
#if BuildXF86DRI 
	DRI_DEFINES = -DIN_DRI_DRIVER 
#endif

in other hand, add other Mesa Missing Define, this one much less critical used
and problematic. 
Comment 12 Sérgio M. Basto 2006-05-23 09:12:50 UTC
Patch in attachment #3848 [details] [review] has been applied to Xorg 6.9 monolith.
Closing ...


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.