http://bugs.freedesktop.org/show_bug.cgi?id=26121

           Summary: Crash on x86-64 (but not on x86) for glLightfv w/o
                    rendering context
           Product: Mesa
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: mesa3d-dev@lists.sourceforge.net
        ReportedBy: tobias.bur...@physik.fu-berlin.de


The problem was encountered using XCrySDen (http://www.xcrysden.org/) and
appears with both mesa-libGL-devel-6.5.1-9.fc6 and Mesa-7.7-5.3.x86_64 on
Linux.

The problem is that calling glLightfv without a rendering context crashes in
libGL x86-64 - while libGL x86 (i686) works. There seems to be a NULL pointer
check missing.

While the application should have a rendering context (I will report a bug), it
probably makes still sense to add a NULL check in Mesa.


$ cat test.c
#include <GL/gl.h>

int main ()
{
GLfloat ambient[4] = {0.2, 0.2, 0.2, 1.0};
glLightfv(GL_LIGHT0, GL_AMBIENT, ambient);
return 0;
}

$ gcc test.c -lGL && ./a.out
Segmentation fault
$ gcc -m32 test.c -lGL && ./a.out
$

See also:
http://sourceforge.net/mailarchive/message.php?msg_name=4B559729.3000509%40net-b.de
http://sourceforge.net/mailarchive/message.php?msg_name=4B55D3B5.9010506%40vmware.com


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to