Bug 55251 - Segmentation fault due to a null-pointer dereference in an assertion in sna_blt_composite()
Summary: Segmentation fault due to a null-pointer dereference in an assertion in sna_b...
Status: CLOSED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Chris Wilson
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-23 19:24 UTC by tka
Modified: 2012-09-23 20:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description tka 2012-09-23 19:24:56 UTC
After building the intel driver with --enable-debug, Xorg crashes after opening firefox and a terminal due to a segmantation fault. The segmentation fault occures after dereferencing a null pointer in the assertion in sna_blt_composite(), sna_blt.c, line 1879:

assert(kgem_bo_is_busy(tmp->dst.bo));

where tmp->dst.bo is NULL and is dereferenced in kgem_bo_is_busy().

The assertion was introduced in commit 92dbedc6138b923aa473935013ecb0346280c4d3. If tmp->dst.bo should not be NULL at this place, I can provide more information. Changing the assertion to

assert(!tmp->dst.bo || kgem_bo_is_busy(tmp->dst.bo));

seems to work for me.

xf86-video-intel: git a858afc66c1fa2eec65a7041e991f2266f82deca
Comment 1 Chris Wilson 2012-09-23 19:38:02 UTC
It would be legal for tmp->dst.bo to be NULL there as we might not actually have a CPU bo at all, meaning that we were forcing the GPU upload for no reason. Whoops.

commit 5ed840881c26e90eb8e00521b6d77b0ea514de5e
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Sep 23 20:29:21 2012 +0100

    sna: Check that the CPU bo exists before declaring it is busy along upload
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55251
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.