[Mesa-dev] [PATCH] winsys/sw/xlib: Prevent shared memory segment leakage.

Jose Fonseca jfonseca at vmware.com
Wed Apr 24 02:42:57 PDT 2013


----- Original Message -----
> On Wed, Apr 24, 2013 at 10:23:38AM +0100, jfonseca at vmware.com wrote:
> > From: José Fonseca <jfonseca at vmware.com>
> > 
> > Running piglit with was causing all sort of weird stuff happening to my
> > desktop (Chromium webpages become blank, Qt Creator flickered, etc).  I
> > tracked this down to shared memory segment leakage when GL is not shutdown
> > properly. The segments can be seen running `ipcs` and looking for
> > nattch==0.
> > 
> > This changes fixes this by calling shmctl(IPC_RMID) soon after creation
> > (which does not remove the segment immediately, but simply marks it for
> > removal when no more processes are attached).
> 
> This is only true on Linux. The *BSD perform an immediate release and so
> require you to complete the XShmAttach prior to calling IPC_RMID.
> -Chris

Thanks Chris. I'll update my patch to do that then.

Jose


More information about the mesa-dev mailing list