Memleak in background extension rxvt_img::muladd

Emanuele Giaquinta emanuele.giaquinta at gmail.com
Tue Jan 9 23:15:24 CET 2024


Hi,

On Tue, Jan 09, 2024 at 09:49:04PM +0100, ej.lfs at xs4all.nl wrote:
> I'm using rxvt-unicode-9.31, with a background image with focus_fade. This
> shows my background the way I like it, but it slowly eats all the memory
> until it starts swapping.
> 
> Digging around I seem to have found the issue (if I understand it
> correctly): in rxvt_img::muladd an image cc is composed, and based on that
> another image cc2 is composed. That image cc2 gets used, but cc and its
> pixmap are kept hanging around and it never gets freed/destroyed.
> That results in a memleak the size of my backgroundpic every muladd is
> called = every time the focus on my terminal window changes.
> 
> Explicitly destroying cc->destimg at the end of muladd fixed the leak for
> me.

thanks for the report. Your analysis is spot on, but the fix is not
complete because the rxvt_img object is still leaked. The attached
patch should address that.

Emanuele
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rxvtimg.diff
Type: text/x-diff
Size: 1174 bytes
Desc: not available
URL: <http://lists.schmorp.de/pipermail/rxvt-unicode/attachments/20240110/38163898/attachment.diff>


More information about the rxvt-unicode mailing list