refstring test failing on Debian i386
I tried updating Debian's glib2.0 package from 2.56.x to 2.57.2.
Tests pass on x86_64, but the refstring test is reliably failing on i386:
# random seed: R02Sf0739e50c1f5ebb8ee2e8ba0e14353af
1..5
# Start of refstring tests
# s = 'hello, world' (0x582aad5c)
ok 1 /refstring/base
PASS: refstring 1 /refstring/base
ok 2 /refstring/length
PASS: refstring 2 /refstring/length
ok 3 /refstring/length-auto
PASS: refstring 3 /refstring/length-auto
ok 4 /refstring/length-nuls
PASS: refstring 4 /refstring/length-nuls
# s = 'hello, world' (0x582aad8c)
# p = s = 'hello, world' (0x582aad8c)
# releasing p[0x582aad8c] ('hello, world')
# p = 'goodbye, world' (0x582aad5c)
# releasing p[0x582aad5c] ('goodbye, world')
# releasing s[0x582aad8c] ('hello, world')
# p[0x582aad8c] ('hello, world') != s[0x582aad8c]
Bail out! GLib:ERROR:../../../../../glib/tests/refstring.c:104:test_refstring_intern: 's == p' should be FALSE
I can see that the test is trying to assert that interned refstrings are freed when there are no more references to them, but I don't think you can actually do that without either looking into the internal implementation of the interning mechanism or running this test under valgrind or similar, because the malloc implementation is free to hand out a pointer numerically equal to any previously-freed memory block as a new memory block.