~compiz-team/compiz/compiz.find-top-level-window-server-frame

Viewing all changes in revision 3378.

  • Committer: Sam Spilsbury
  • Date: 2012-09-17 14:32:28 UTC
  • Revision ID: sam.spilsbury@canonical.com-20120917143228-ef1ruth0cxd9q4v8
Check that pixmaps which aren't managed by us actually exist before binding.

It was possible for there to be a race condition for a pixmap to become
invalid on the server side if the client which did have control over thier
lifecycle freed them before we were done with them or disconnected. Drivers
have normally handled this condition by reading the contents of the undefined
memory directly without an error, however drivers such as LLVMpipe will
effectively dereference an invalid pointer and crash when you do this.

Eg:

compiz crashed with SIGSEGV in memmove() from drisw_update_tex_buffer() from dri_set_tex_buffer2() from drisw_bind_tex_image() from __glXBindTexImageEXT() from TfpTexture::enable()

Most of the time we don't need to employ this check. Its only when we know
that we don't control the lifecycle of a pixmap that race conditions
such as these can occurr.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: