Bug 215551 - libpsx memory leak
Summary: libpsx memory leak
Status: RESOLVED CODE_FIX
Alias: None
Product: Tools
Classification: Unclassified
Component: libcap (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Andrew G. Morgan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-30 21:09 UTC by Andrew G. Morgan
Modified: 2022-04-11 00:05 UTC (History)
0 users

See Also:
Kernel Version: n/a
Tree: Mainline
Regression: No


Attachments
Memory leak fix for libpsx. (887 bytes, text/plain)
2022-01-30 21:09 UTC, Andrew G. Morgan
Details

Description Andrew G. Morgan 2022-01-30 21:09:21 UTC
Created attachment 300355 [details]
Memory leak fix for libpsx.

Kalen Hall has reported a Valgrind detected memory leak associated with a multi-threaded program linked against libcap and libpsx. Kalen has provided the attached patch to resolve it.

I'm filing this bug to track committing this fix. I first want to confirm that in-flight PSX interrupts don't trip over this in some subtle way.
Comment 1 Andrew G. Morgan 2022-02-06 01:38:34 UTC
This should be fixed with:

https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=66a8a1421e4520e9dda0a46704e25bafb989b1ae

Will include it in libcap-2.64 (which will be the next release, likely within a month).
Comment 2 Andrew G. Morgan 2022-04-10 22:41:43 UTC
It looks like this wasn't a complete fix after all. When running `make test` in the build tree, I see `libcap_psx_test` processes hanging around.
Comment 3 Andrew G. Morgan 2022-04-11 00:05:04 UTC
I'm hopeful this fixes that problem:

https://git.kernel.org/pub/scm/libs/libcap/libcap.git/commit/?id=7617af6b0754da00c1094215ee7828d6592f8ade

It eliminated the unexited `libcap_psx_test` binaries in my many subsequent test runs.

This is included in libcap-2.64. That release happened today.

Note You need to log in before you can comment on or make changes to this bug.