[Mesa-dev] segfault in pstip_bind_sampler_states

Brian Paul brianp at vmware.com
Fri Aug 9 10:59:21 PDT 2013


On 08/09/2013 11:53 AM, Kevin H. Hobbs wrote:
> On 08/09/2013 09:16 AM, Brian Paul wrote:
>> On 08/07/2013 12:17 PM, Kevin H. Hobbs wrote:
>>>
>>> #0  pstip_bind_sampler_states (pipe=<optimized out>, num=0, sampler=0x0)
>>> at draw/draw_pipe_pstipple.c:713
>>>
>> Hmm, I'd expect memcpy() of length zero to be fine even if src/dst were
>> null.
>>
>
> memcpy is fine, the segfault happens at line 713 two lines below where :
>
> pstip->state.samplers[i] = NULL;

OK, maybe it's pstip that's null then.


>
> I asked gdb what to print pstip->state.samplers[0] and it told me
> something like "unavailable".

Yeah, you'll need a debug build to get useful info out of gdb (configure 
with CFLAGS="-g -O0").

>
>> Can you try this patch?
>>
>
> I can and I will.

That's probably not it, given the above.  Can you try setting a 
breakpoint on pstip_destroy() and see if that's getting called before 
the segfault?  If so, things are getting freed in the wrong order.

-Brian



More information about the mesa-dev mailing list