Comment 2 for bug 2044420

Revision history for this message
Matthew Ruffell (mruffell) wrote :

I have managed to write a minimal reproducer program:

#include <glib.h>
int main(int argc, char **argv) {
 const gchar* badstring = "fórmula, vol. 2 (deluxe edition)";
 gsize len = 2;
 gchar* ret;

 ret = g_utf8_collate_key(badstring, len);
 g_free(ret);

 return 0;
}

With the following Makefile:

all:
 cc `pkg-config --cflags glib-2.0` hello.c -g -o hello `pkg-config --libs glib-2.0`

On mantic, with:
$ apt-cache policy libglib2.0-0 | grep Installed
  Installed: 2.78.0-2
$ apt-cache policy libc6 | grep Installed
  Installed: 2.38-1ubuntu6
$ make
cc `pkg-config --cflags glib-2.0` hello.c -g -o hello `pkg-config --libs glib-2.0`
$ gdb hello
Program received signal SIGSEGV, Segmentation fault.
__wcslen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:76
76 ../sysdeps/x86_64/multiarch/strlen-avx2.S: No such file or directory.
(gdb) bt
#0 __wcslen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:76
#1 0x00007ffff7cd0ace in __GI___wcsxfrm_l (dest=0x0, src=0x0, n=0, l=<optimised out>) at ../string/strxfrm_l.c:676
#2 0x00007ffff7ef1a5e in g_utf8_collate_key () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3 0x00005555555551a2 in main (argc=1, argv=0x7fffffffe118) at hello.c:8

and now on Lunar, with:
$ apt-cache policy libglib2.0-0 | grep Installed
  Installed: 2.76.1-1
$ apt-cache policy libc6 | grep Installed
  Installed: 2.37-0ubuntu2.1
$ make
cc `pkg-config --cflags glib-2.0` hello.c -o hello `pkg-config --libs glib-2.0`
$ gdb hello
[Inferior 1 (process 3593) exited normally]

This seems to be a glib or glibc bug, and not gtkpod. Introduced in mantic and later.