[Mesa3d-dev] drawing with elements out of range

2009-10-09 Thread michal
I've been able to crash my app that uses a gallium driver by feeding the 
draw module an index buffer with garbage contents.

Is there a desire to add out-of-bounds checking of every index element, 
or is it being ignored on purpose for performance reasons?

Thanks.

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


Re: [Mesa3d-dev] drawing with elements out of range

2009-10-09 Thread Keith Whitwell
On Fri, 2009-10-09 at 04:10 -0700, michal wrote:
 I've been able to crash my app that uses a gallium driver by feeding the 
 draw module an index buffer with garbage contents.
 
 Is there a desire to add out-of-bounds checking of every index element, 
 or is it being ignored on purpose for performance reasons?

Michal,

There is code that should prevent this, but it probably doesn't get
heaps of testing.

Probably the best thing to do is provide a trivial/ example that
exercises the problem you're seeing.

Keith




--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


Re: [Mesa3d-dev] drawing with elements out of range

2009-10-09 Thread michal
Keith Whitwell pisze:
 On Fri, 2009-10-09 at 04:10 -0700, michal wrote:
   
 I've been able to crash my app that uses a gallium driver by feeding the 
 draw module an index buffer with garbage contents.

 Is there a desire to add out-of-bounds checking of every index element, 
 or is it being ignored on purpose for performance reasons?
 

 Michal,

 There is code that should prevent this, but it probably doesn't get
 heaps of testing.

 Probably the best thing to do is provide a trivial/ example that
 exercises the problem you're seeing.


   
While I would agree otherwise, there is a high chance the test app won't 
trigger a segfault.

I am happy the intent is to check element indirections and should be 
able to provide a patch for it for a review instead.

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev


Re: [Mesa3d-dev] drawing with elements out of range

2009-10-09 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

michal wrote:

 Is there a desire to add out-of-bounds checking of every index element, 
 or is it being ignored on purpose for performance reasons?

The later.  The OpenGL spec allows implementations to crash buggy
applications anytime that preventing such a crash would impact the
performance of correct applications.  The only caveat is that the
implementation is not supposed to crash the system.  This means that we
have to add extra checks in versions of the driver that are loaded into
the X server, for example.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrPjQQACgkQX1gOwKyEAw/22ACfRH6QLk7ulJFPCHo1Kbls/K/h
PTAAnA0HK2D1tgEyIljrIE1NTHZbZwwJ
=eBXz
-END PGP SIGNATURE-

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev