Now based on !1908 (merged).
error test: Don't test programmer error if asked not to
gio: Don't run gsocketclient-slow test under sanitizers
AddressSanitizer, UndefinedBehaviourSanitizer and probably others involve adding instrumentation into the code under test, which doesn't go well with LD_PRELOAD modules that absolutely need to be self-contained.
glib-private: Add infrastructure to detect AddressSanitizer
gtestutils: Default to -m no-undefined under AddressSanitizer
AddressSanitizer detects memory leaks, NULL parameters where only a non-NULL parameter is expected, and other suspicious behaviour, so if we try to test that sort of thing we can expect it to fail.
glib-private: Add wrappers for telling AddressSanitizer to ignore leaks
gutils: Tell AddressSanitizer not to track previous XDG directories
We reset these in some unit tests, and must deliberately leak them to avoid having to break API.
tests: Mark tests with AddressSanitizer-detected leaks
Various tests have leaks where it isn't clear whether the data is intentionally not freed, or leaked due to a bug. If we mark these tests as TODO, we can skip them under AddressSanitizer and get the rest to pass, giving us a baseline from which to avoid regressions.
I haven't opened separate bugs for all the leaky tests yet, so for now they all point to this MR.