[Mesa-dev] [PATCH] svga: Check vs and fs pointer when updating states.

Brian Paul brianp at vmware.com
Wed Mar 7 07:44:01 PST 2012


On 03/07/2012 01:08 AM, Vic Lee wrote:
> Hi Brian,
>
> I created a smallest possible test case to reproduce the segfault, as
> attached.

OK, I was assuming that you found this with an OpenGL program, not 
with a custom direct-to-gallium program.


> Please see file header on how I compile it. vs and fs both
> needs to be checked to avoid the segfault.

Hmmm, I only needed to add the null vs check to prevent the segfault.
Are you sure about the fs check?  We only use svga->curr.fs when 
assigning to the generic_inputs var and we check for a null pointer there.

-Brian


More information about the mesa-dev mailing list