Bug 111681 - Shared Memeory leakage in XCreateDrawable
Summary: Shared Memeory leakage in XCreateDrawable
Alias: None
Product: Mesa
Classification: Unclassified
Component: GLX (show other bugs)
Version: 19.1
Hardware: x86 (IA32) Linux (All)
: high major
Assignee: mesa-dev
QA Contact: mesa-dev
Depends on:
Reported: 2019-09-13 10:14 UTC by andreasgottschling
Modified: 2019-09-18 17:46 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Solving the shared memory leakge problem (675 bytes, patch)
2019-09-13 10:14 UTC, andreasgottschling
Details | Splinter Review

Description andreasgottschling 2019-09-13 10:14:53 UTC
Created attachment 145344 [details] [review]
Solving the shared memory leakge problem

In rc/glx/drisw_glx.c
XCreateDrawable(struct drisw_drawable * pdp, int shmid, Display * dpy)

it will be checked at entering function if there is an image already defined and if so it will get destroyed. Unfortunately this marks the Shared Memory only as "dest" ( "Mark the segment to be destroyed. The segment will actually be destroyed only after the last process detaches it.")
But after this call the XShmDetachCall is missing and so shared memory will sum up until the program is finished

I tested attached patch it works.
Comment 1 GitLab Migration User 2019-09-18 17:46:19 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/121.

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.