[Mesa-dev] [PATCH] svga: Check vs and fs pointer when updating states.
Vic Lee
llyzs.vic at gmail.com
Wed Mar 7 00:08:10 PST 2012
Hi Brian,
I created a smallest possible test case to reproduce the segfault, as
attached. Please see file header on how I compile it. vs and fs both
needs to be checked to avoid the segfault.
If I replace the screen creation part to use swrast or r600, they both
work fine.
Thanks.
Vic
On 03/06/2012 07:44 AM, Brian Paul wrote:
> On 03/03/2012 04:17 AM, Vic Lee wrote:
>> This patch fix segfault if an application clears a render target
>> before setting any vertex or fragment shaders, which is a legal
>> situation.
>
> I can't seem to trigger this problem with a test program. Can you post a
> test case?
>
> The first part of your patch looks OK but I don't see why the second
> part is needed. We already check svga->curr.fs before dereffing the
> pointer.
>
> -Brian
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.c
Type: text/x-csrc
Size: 2802 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120307/53f8f439/attachment-0001.c>
More information about the mesa-dev
mailing list