Some OOM checks are failing on Windows
After enabling OOM memory checks on Windows (see https://gitlab.freedesktop.org/dbus/dbus/blob/master/dbus/dbus-memory.c#L257) I get some failing tests:
...
9% tests passed, 3 tests failed out of 28
Total Test time (real) = 182.80 sec
The following tests FAILED:
3 - test-spawn-oom (Failed)
8 - test-bus (Failed)
10 - test-bus-dispatch-sha1 (Failed)
Errors while running CTest
make: *** [Makefile:141: test] Fehler 8
3: not ok 11 - spawn_nonexistant oom leaked 3 blocks
...
3: not ok 13 - spawn_segfault oom leaked 6 blocks
...
3: not ok 15 - spawn_exit oom leaked 9 blocks
...
: not ok 17 - spawn_and_kill oom leaked 12 blocks
...
3: # 4/17 tests failed
1/1 Test #3: test-spawn-oom ...................***Failed 0.94 sec
...
8: not ok 9 - activation-service-reload leaked 18 blocks
...
8: not ok 12 - unix-fds-passing leaked 18 blocks
...
8: # 2/12 tests failed
1/1 Test #8: test-bus .........................***Failed 2.56 sec
'10: dbus-daemon[383]: error: assertion failed "(real)->valid" file "/home/xxx/src/dbus/dbus/dbus-string.c" line 1104 function _dbus_string_append_printf_valist
10: Backtrace:
10: 0 __kernel_vsyscall+0x7 in [vdso].so
10: 1 __read+0x5b in libpthread.so.0
10: 2 0x7bc7f3a7 in ntdll
10: 3 0x7bc80b13 in ntdll
10: 4 0x7bc87d45 in ntdll
10: 5 NtWaitForMultipleObjects+0x2a in ntdll
10: 6 InterlockedDecrement+0x35c in kernel32
10: 7 WaitForMultipleObjectsEx+0x33 in kernel32
10: 8 WaitForSingleObject+0x2c in kernel32
10: 9 dump_backtrace+0xa6 [/home/xxx/src/dbus/dbus/dbus-sysdeps-win.c:2686] in libdbus-1-3
10: 10 _dbus_print_backtrace+0xb [/home/xxx/src/dbus/dbus/dbus-sysdeps-win.c:2697] in libdbus-1-3
10: 11 _dbus_abort+0xc [/home/xxx/src/dbus/dbus/dbus-sysdeps.c:93] in libdbus-1-3
10: 12 _dbus_warn+0x6e [/home/xxx/src/dbus/dbus/dbus-internals.c:252] in libdbus-1-3
10: 13 _dbus_real_assert+0x34 [/home/xxx/src/dbus/dbus/dbus-internals.c:968] in libdbus-1-3
10: 14 _dbus_string_append_printf_valist+0x7f [/home/xxx/src/dbus/dbus/dbus-string.c:1104] in libdbus-1-3
10: 15 _dbus_string_append_printf+0x25 [/home/xxx/src/dbus/dbus/dbus-string.c:1146] in libdbus-1-3
10: 16 _dbus_poll+0x59 [/home/xxx/src/dbus/dbus/dbus-sysdeps-win.c:1326] in libdbus-1-3
10: 17 socket_set_poll_poll+0x96 [/home/xxx/src/dbus/dbus/dbus-pollable-set-poll.c:284] in test-bus-dispatch-sha1
10: 18 _dbus_pollable_set_poll+0x2b [/home/xxx/src/dbus/./dbus/dbus-pollable-set.h:112] in test-bus-dispatch-sha1
10: 19 _dbus_loop_iterate+0x1ee [/home/xxx/src/dbus/dbus/dbus-mainloop.c:663] in test-bus-dispatch-sha1
10: 20 bus_test_run_everything+0x44 [/home/xxx/src/dbus/bus/test.c:262] in test-bus-dispatch-sha1
10: 21 kill_client_connection+0xb9 [/home/xxx/src/dbus/bus/dispatch.c:834] in test-bus-dispatch-sha1
10: 22 check_hello_connection+0x122 [/home/xxx/src/dbus/bus/dispatch.c:1865] in test-bus-dispatch-sha1
10: 23 check_oom_check2_func+0x41 [/home/xxx/src/dbus/bus/dispatch.c:4732] in test-bus-dispatch-sha1
10: 24 run_failing_each_malloc+0x50 [/home/xxx/src/dbus/dbus/dbus-internals.c:1010] in libdbus-1-3
10: 25 _dbus_test_oom_handling+0x17d [/home/xxx/src/dbus/dbus/dbus-internals.c:1099] in libdbus-1-3
10: 26 check2_try_iterations+0x34 [/home/xxx/src/dbus/bus/dispatch.c:4759] in test-bus-dispatch-sha1
10: 27 bus_dispatch_sha1_test+0x15e [/home/xxx/src/dbus/bus/dispatch.c:5110] in test-bus-dispatch-sha1
10: 28 _dbus_test_main+0x217 [/home/xxx/src/dbus/test/test-utils.c:762] in test-bus-dispatch-sha1
10: 29 main+0x48 [/home/xxx/src/dbus/test/bus/dispatch-sha1.c:62] in test-bus-dispatch-sha1
10: 30 0x401386 in test-bus-dispatch-sha1
10: 31 call_process_entry+0xc in kernel32
10: 32 0x7b46637e in kernel32
10: 33 call_process_entry+0x1a in kernel32
1/1 Test #10: test-bus-dispatch-sha1 ...........***Failed 62.00 sec
I get the last error after applying the patch from !125 (merged)
see also #149 (closed)