[Mesa-dev] [PATCH] fix crash: check for _NumLinkedShaders being 0.

Ian Romanick idr at paranormal-entertainment.com
Tue Sep 7 12:29:50 PDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Török Edwin wrote:
> On Sun, 5 Sep 2010 09:48:22 -0700
> Ian Romanick <idr at paranormal-entertainment.com> wrote:
> 
>> On Sep 4, 2010, at 3:48 AM, Török Edwin <edwintorok at gmail.com> wrote:
>>
>>> From: Török Edvin <edwintorok at gmail.com>
>>>
>>> Otherwise spring 0.82+.4.0 crashes when starting a game
>>> because prog->_LinkedShaders[0] is NULL.
>> Any idea what this app is doing to hit this?  A piglit test would be  
>> good.
> 
> Looks like this occurs when linking a completely empty program.
> I wrote a piglit test based on other similar tests (see attached file).
> 
> This is first time I write a piglit test, so I'm not sure if this is
> the right way to do it, but here is what it does:
> $ bin/glsl-emptylink
> Segmentation fault
> 
> After applying the mesa patch:
> $ bin/glsl-emptylink 
> PIGLIT: {'result': 'pass' }

Okay.  A added your test and another similar test to piglit.  I changed
the name of your test to glsl-link-empty-prog-01.  My test is
glsl-link-empty-prog-02.

I also applied your patch to the compiler.

Thanks for tracking this down.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyGkq0ACgkQX1gOwKyEAw+5bwCePkxVBhQBAYeMIbTHTBFinGrl
XSYAnizgB+9eIquDR3KuXMh50L92GPT4
=BYZQ
-----END PGP SIGNATURE-----


More information about the mesa-dev mailing list