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

           Summary: glBindTexture causes a segmentation fault with invalid
                    targets
           Product: Mesa
           Version: CVS
          Platform: x86 (IA32)
        OS/Version: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


This is arguably a bug in the program using mesa, but it'll be nice if mesa
doesn't crash :)

calling glBindTexture with an invalid target (0 in my case) causes a segfault.
top frames from the backtrace are:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1230031168 (LWP 5066)]
valid_texture_object (tex=0x0) at main/texobj.c:233
233     main/texobj.c: No such file or directory.
        in main/texobj.c
Current language:  auto; currently c
(gdb) bt
#0  valid_texture_object (tex=0x0) at main/texobj.c:233
#1  0xb67b4de8 in _mesa_BindTexture (target=0, texName=0) at main/texobj.c:910

In this particular case, the texName is 0. The code has a comment:
 840       /* newTexObj = a default texture object */
 841       switch (target) {
[...]
 863          default:
 864             ; /* Bad targets are caught above */
 865       }

but i don't see any code that catches the bad targets. The result is that
newTexObj is NULL and the assert on valid_texture_object(newTexObj) causes a
segfault.


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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to