[Mesa-dev] [Mesa-stable] [PATCH] i965: Fix crash when calling glViewport with no surface bound

Emil Velikov emil.l.velikov at gmail.com
Wed Dec 9 07:46:10 PST 2015


On 9 December 2015 at 14:57, Neil Roberts <neil at linux.intel.com> wrote:
> Emil Velikov <emil.l.velikov at gmail.com> writes:
>
>> Worth throwing in 11.0 as well ?
>
> Yeah, that would probably be sensible.
>
>>>     if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {
>>> -      dri2InvalidateDrawable(driContext->driDrawablePriv);
>>> -      dri2InvalidateDrawable(driContext->driReadablePriv);
>>> +      if (driContext->driDrawablePriv)
>>> +         dri2InvalidateDrawable(driContext->driDrawablePriv);
>>> +      if (driContext->driReadablePriv)
>>> +         dri2InvalidateDrawable(driContext->driReadablePriv);
>>
>>  Afaict i915 could use an identical fix ?
>
> Yes, I think you're right. However I don't have any way of testing it so
> I feel a bit uncomfortable touching i915 driver.
>
Considering it's a null-deref fix one can just move the check in
dri2InvalidateDrawable, which would spare going through i915, i965,
radeon... ;-)

Just throwing it out there, it's up-to whichever route you want to take.
-Emil


More information about the mesa-dev mailing list