On 3/9/26 2:42 AM, Peter Maydell wrote:
On Sun, 8 Mar 2026 at 23:42, Pierrick Bouvier
<[email protected]> wrote:
On 3/8/26 12:22 PM, Peter Maydell wrote:
I'm continuing to work through leaks reported during "make check".
Some of them come from the migration-test. (For these to actually
appear in the log you need to run with QTEST_LOG=1, otherwise the
migration test framework will send stderr to /dev/null and the
tests will fail without printing the leak report.)
I did find this comment in qmp_migrate_incoming():
* NOTE: QEMU _might_ leak this refcount in some failure paths, but
* that's OK. This is the minimum change we need to at least making
* sure success case is clean on the refcount. We can try harder to
* make it accurate for any kind of failures, but it might be an
* overkill and doesn't bring us much benefit.
The issue with this is that it means we need to suppress leak
reports in the whole migration-test binary, which means the
migration code will get no leak-detection coverage at all.
(Not all the leak paths have qmp_migrate_incoming() in their backtrace,
as you can see below.)
We're getting pretty close to being able to get a complete "make check"
run with the leak sanitizer enabled, so it would be nice to not have
to suppress leak reports for this test at some point.
That's a nice thing in itself.
Is the end goal is to enable that in CI? If not, I doubt there is a
strong value in reaching that state today. You'll run out of steam and
motivation to fix that yourself in the end.
Same goes for all other sanitizer errors.
Yes, I'd like to be able to get this into CI at some point.
I periodically have a look through some of these things and
whittle down the number of failures.
That's great to hear that. In the past, I used to run sanitized builds
also but lost motivation chasing and fixing new bugs added upstream. I
tried to push the idea a few times to add in CI but comments were
usually "we don't want to spend CI minutes on that", so that's great to
see this change coming from you.
If we can reach a stable state and enforce it in CI for all tests +
check-tcg, this would be a really good thing for QEMU community.
Regards,
Pierrick