gegl_tile test fails with GLib 2.75.3 (or GLib 2.74.3 with G_SLICE=always-malloc)
Not sure if this is a gegl issue or a glib issue, sorry if I open the issue in wrong place
gegl:simple / gegl_tile
test fails for me when building with GLib 2.75.3:
32/235 gegl:simple / gegl_tile ERROR 0.79s killed by signal 6 SIGABRT
>>> ABS_TOP_SRCDIR=/build/gegl-0.4.42 GEGL_SWAP=RAM ABS_TOP_BUILDDIR=/build/gegl-0.4.42/build LD_LIBRARY_PATH=/build/gegl-0.4.42/build/gegl GEGL_PATH=/build/gegl-0.4.42/build/operations MALLOC_PERTURB_=49 /build/gegl-0.4.42/build/tests/simple/gegl-tile
✀
stderr:
free(): invalid pointer
(test program exited with status code -6)
TAP parsing error: Too few tests run (expected 2, got 1)
GLib 2.75.3 contains a change gslice: remove slice allocator. The gegl_tile test does not fail for me before this change. I can also reproduce (i.e. same stderr) the test failure with Glib 2.74.3 by setting export G_SLICE=always-malloc
.
Here is bt full
when I run tests/simple/gegl-tile
standalone (https://gitlab.gnome.org/GNOME/gegl/-/blob/GEGL_0_4_42/gegl/buffer/gegl-tile.c#L83):
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
tid = 3270
ret = 0
pd = <optimized out>
old_mask = {__val = {0, 5600421349006187264, 140731529061824, 18446744073709551488, 2, 29468752, 2, 0, 0, 140409657987747, 28833488, 29936689, 29936273, 29863248, 29863184,
29468752}}
ret = <optimized out>
#1 0x00007fb3abc8ac33 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
No locals.
#2 0x00007fb3abc3db46 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
ret = <optimized out>
#3 0x00007fb3abc284b5 in __GI_abort () at abort.c:79
save_stage = 1
act = {__sigaction_handler = {sa_handler = 0x1c61320, sa_sigaction = 0x1c61320}, sa_mask = {__val = {140409657883199, 0, 1, 1, 140409659421760, 29936689, 0, 1, 140409657890681,
140409659438496, 140409657888143, 0, 5600421349006187264, 29936688, 18446744073709551488, 24}}, sa_flags = 28789296, sa_restorer = 0x18}
sigs = {__val = {32, 1, 29825344, 29936272, 140409662049028, 140409658402668, 0, 1, 1, 29758240, 1, 140409657886397, 0, 140409659438496, 3432, 140409659421760}}
#4 0x00007fb3abc7ea60 in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7fb3abdbbc6c "%s\n") at ../sysdeps/posix/libc_fatal.c:155
ap = {{gp_offset = 24, fp_offset = 0, overflow_arg_area = 0x7ffe9ccc6870, reg_save_area = 0x7ffe9ccc6800}}
fd = 2
list = <optimized out>
nlist = <optimized out>
cp = <optimized out>
#5 0x00007fb3abc94bca in malloc_printerr (str=str@entry=0x7fb3abdb9752 "free(): invalid pointer") at malloc.c:5659
No locals.
#6 0x00007fb3abc9671c in _int_free (av=<optimized out>, p=<optimized out>, have_lock=have_lock@entry=0) at malloc.c:4434
size = 30095024
fb = <optimized out>
nextchunk = <optimized out>
nextsize = <optimized out>
nextinuse = <optimized out>
prevsize = <optimized out>
bck = <optimized out>
fwd = <optimized out>
__PRETTY_FUNCTION__ = "_int_free"
#7 0x00007fb3abc992a3 in __GI___libc_free (mem=<optimized out>) at malloc.c:3386
ar_ptr = <optimized out>
p = <optimized out>
err = 2
#8 0x00007fb3ac0265c5 in g_free (mem=<optimized out>) at ../glib/gmem.c:229
No locals.
#9 0x00007fb3ac03f60e in g_slice_free1 (mem_size=mem_size@entry=8, mem_block=<optimized out>) at ../glib/gslice.c:1185
chunk_size = 16
acat = 0
_g_boolean_var_ = <optimized out>
#10 0x00007fb3ac16e945 in gegl_tile_unref (tile=tile@entry=0x1c7ad10) at ../gegl/buffer/gegl-tile.c:83
No locals.
#11 0x00000000004012f8 in set_data_full () at ../tests/simple/test-gegl-tile.c:75
tile = 0x1c7ad10
callback_called = 1
data = 42 '*'
__func__ = "set_data_full"
#12 0x00007fb3ac04979e in test_case_run (tc=0x1c8c9a0) at ../glib/gtestutils.c:2933
local_error = 0x0
test_run_timer = 0x1c8cbd0
largs = {0, 0, 2.59999999999999983999e-05}
fixture = 0x0
old_base = 0x0
old_free_list = 0x0
filename_free_list = 0x0
success = 0
old_base = <optimized out>
old_free_list = <optimized out>
filename_free_list = <optimized out>
success = <optimized out>
test_run_timer = <optimized out>
largs = <optimized out>
fixture = <optimized out>
_pp = <optimized out>
_ptr = <optimized out>
local_error = <optimized out>
dentry = <optimized out>
_pp = <optimized out>
_ptr = <optimized out>
#13 g_test_run_suite_internal (suite=suite@entry=0x1c8ca50, path=path@entry=0x0) at ../glib/gtestutils.c:3021
tc = 0x1c8c9a0
n_bad = 0
old_name = 0x1c6d8c0 "/gegl-tile"
iter = 0x1c8cbb0
__func__ = "g_test_run_suite_internal"
#14 0x00007fb3ac049505 in g_test_run_suite_internal (suite=suite@entry=0x1c719a0, path=path@entry=0x0) at ../glib/gtestutils.c:3038
ts = 0x1c8ca50
n_bad = 0
old_name = 0x1c8cb60 "/"
iter = 0x1c8cb00
__func__ = "g_test_run_suite_internal"
#15 0x00007fb3ac049ca2 in g_test_run_suite (suite=suite@entry=0x1c719a0) at ../glib/gtestutils.c:3115
n_bad = 0
__func__ = "g_test_run_suite"
#16 0x00007fb3ac049d0d in g_test_run () at ../glib/gtestutils.c:2234
ret = <optimized out>
suite = 0x1c719a0
#17 0x000000000040114b in main (argc=<optimized out>, argv=<optimized out>) at ../tests/simple/test-gegl-tile.c:89
No locals.
Thanks for the help!