x11-utils: xprop -spy leaks memory

Eirik Byrkjeflot Anonsen eirik at eirikba.org
Mon May 18 12:39:06 PDT 2015


Alan Coopersmith <alan.coopersmith at oracle.com> writes:

> On 05/15/15 09:55 AM, Tomas Janousek wrote:
>> Hello,
>>
>> On Tue, Jan 13, 2015 at 02:38:39AM +0100, DesDZ wrote:
>>> There seems to be a memory leak in the xprop tool, when using the -spy
>>> option. Pulseaudio uses that option to know when the X session ends, as
>>> an example. On my (long-running) X session, xprop memory usage was
>>> steadily growing until using 1.5G...
>>>
>>> You'll find a patch as an attachment, it's not mine and I couldn't test
>>> it, I found it at:
>>> http://thread.gmane.org/gmane.linux.debian.devel.pulseaudio/4456
>>>
>>> Here is the related Debian Bug:
>>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765828
>>>
>>> Thanks for your hard work...
>>
>> Ping? This still seems to be a problem. :-(
>
> It would help if it was submitted by someone who had written or tested the
> patch, otherwise, you're relying on someone else to have time to do so, and
> that may take years given how few people work on the core X.Org applications
> these days.
>

I don't think that patch is correct. I believe 'data' isn't always
allocated by X, and so shouldn't be XFreed. In fact, it isn't always
heap-allocated at all (if I remember correctly). I have my own (sequence
of) patch(es) that plugs all (I think) the leaks I found. I should
really post that.

eirik


More information about the xorg-devel mailing list