Here's a bug report I got from <[EMAIL PROTECTED]>.
Can someone help out with this, please?
--
G. Branden Robinson | Suffer before God and ye shall be
Debian GNU/Linux | redeemed. God loves us, so He
[EMAIL PROTECTED] | makes us suffer Christianity.
http://people.debian.org/~branden/ | -- Aaron Dunsmore
Package: xserver-xfree86
Version: 4.1.0-8
Severity: important
The following program calls glVertex3f with nan as one of the
arguments. This should obviously not be done, but it then proceeds to
crash the entire X server, which isn't good.
I don't have the DRI module loaded because my motherboard is buggy
with agpgart, so this is software rendering.
When I run glxinfo, this is what it says for renderer:
OpenGL vendor string: VA Linux Systems, Inc.
OpenGL renderer string: Mesa GLX Indirect
OpenGL version string: 1.2 Mesa 3.4.2
A program that causes this crash follows:
// compile with gcc -lm -lGL -lGLU $(sdl-config --cflags --libs) crashx.c
#include <GL/gl.h>
#include <GL/glu.h>
#include "SDL.h"
#include <math.h>
int main()
{
int videoFlags;
SDL_Surface *surface;
const SDL_VideoInfo *videoInfo;
if (SDL_Init(SDL_INIT_VIDEO)<0) {
fprintf(stderr, "Video initialization failed: %s\n", SDL_GetError());
exit(1);
}
videoInfo=SDL_GetVideoInfo();
if (!videoInfo) {
fprintf(stderr, "Video query failed: %s\n", SDL_GetError());
exit(1);
}
videoFlags = SDL_OPENGL;
videoFlags |= SDL_GL_DOUBLEBUFFER;
videoFlags |= SDL_HWPALETTE;
videoFlags |= SDL_RESIZABLE;
if (videoInfo->hw_available)
videoFlags |= SDL_HWSURFACE;
else
videoFlags |= SDL_SWSURFACE;
if (videoInfo->blit_hw)
videoFlags |= SDL_HWACCEL;
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
surface=SDL_SetVideoMode(320, 200, 16, videoFlags);
if (!surface) {
fprintf(stderr, "Video mode set failed: %s\n", SDL_GetError());
exit(1);
}
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glViewport(0, 0, (GLsizei)320, (GLsizei)200);
glMatrixMode( GL_PROJECTION );
glLoadIdentity( );
gluPerspective( 45.0f, 320/200, 0.01f, 2.0f );
gluLookAt(2.0, 0.0, 0.01,
2.0 + cos(M_PI+0.1), 0.0+sin(M_PI+0.1), 0.0,
0.0, 0.0, 1.0);
glMatrixMode( GL_MODELVIEW );
glLoadIdentity( );
glBegin(GL_TRIANGLES);
glVertex3f(1.0, 1.0, 1.0/0.0);
glVertex3f(0.0, 1.0, 0.0);
glVertex3f(0.0, 0.0, 0.0);
glEnd();
SDL_GL_SwapBuffers( );
}
-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux WhiteCap 2.4.10 #1 Wed Sep 26 14:34:46 EDT 2001 i586
Locale: LANG=C, LC_CTYPE=C
Versions of packages xserver-xfree86 depends on:
ii debconf 1.0.15 Debian configuration management sy
ii libc6 2.2.4-3 GNU C Library: Shared libraries an
ii xserver-common 4.1.0-8 files and utilities common to all
ii zlib1g 1:1.1.3-16 compression library - runtime
PGP signature