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

Vic Lee llyzs.vic at gmail.com
Wed Mar 7 09:01:17 PST 2012


Hi Brian,

On 03/07/2012 11:44 PM, Brian Paul wrote:
> 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.
Right, we are experimenting our custom application on VMware platform 
which communicates to the driver directly through gallium interface.

>> 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.
Yes, I tried the test case I sent. Without the fs check it will still 
segfaults.

> -Brian

Thanks,

Vic


More information about the mesa-dev mailing list