gmenumodel test leaks GCancellableSource objects
To reproduce:
- recent GLib (I used c07f8a70 as a base, with !1905 (merged) applied)
- a recent GNU/Linux system (I used Debian's
unstable
rolling release) - build GLib with gcc AddressSanitizer (
-Db_sanitize=address
in Meson)- I used Debian's gcc 10.2.1-6
- I used UndefinedBehaviourSanitizer too (
-Db_sanitize=address,undefined
) but that probably doesn't matter - clang AddressSanitizer would probably also reproduce this
- if !1905 (merged) has been applied, partially or fully revert commit "tests: Mark tests with AddressSanitizer-detected leaks" to re-expose this leak
- run unit tests, specifically
glib:gio / gmenumodel
(akagio/tests/gmenumodel.c
)
Expected result: no memory is leaked and unreachable on process exit.
Actual result: I've sometimes seen this leaking a GCancellableSource, although I can't reproduce it now. This might be the same bug as #2309, or might be something different.
For now, I've marked this test g_test_incomplete()
when running under AddressSanitizer, so that we can run the rest of the test-suite under AddressSanitizer and at least make sure we don't regress.