GNOME Bugzilla – Bug 447933
make check failing in trunk
Last modified: 2007-06-16 16:07:03 UTC
/bin/bash: line 4: 13080 Segmentation fault (core dumped) srcdir=. LIBCHARSET_ALIAS_DIR=../glib/libcharset MALLOC_CHECK_=2 MALLOC_PERTURB_=$((${RANDOM:-256} % 256)) ${dir}$tst FAIL: keyfile-test I was about to commit garnaco's GRegex patch, but make check was failing. So to be sure I ran make check on a clean checkout of GLib and hit this.
Seems that I'm doing something wrong on my end.
cody@cody-desktop:~/svn/gnome/glib/tests/.libs$ gdb ./lt-keyfile-test GNU gdb 6.6-debian Copyright (C) 2006 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "x86_64-linux-gnu"... Using host libthread_db library "/lib/libthread_db.so.1". (gdb) run Starting program: /home/cody/svn/gnome/glib/tests/.libs/lt-keyfile-test Program received signal SIGSEGV, Segmentation fault. 0x00002b7f31f1f620 in strlen () from /lib/libc.so.6 (gdb) bt
+ Trace 141319
If this is any help, it runs fine on my 32-bit laptop. But on my 64-bit desktop it crashes with the above stacktrace. Another irc user also reproduced the it on his 64-bit machine, but said string-test was failing for him as well and it's not failing for me.
Here are two similar stacktraces (SVN rev 5569) keyfile-test:
+ Trace 141321
Looks possibly related to #57693
http://bugzilla.gnome.org/show_bug.cgi?id=57693
If it is related to Bug 57693, then it just had uncovered another bug - I guess. Investigating, but do not have a 64 bit machine. Well, maybe this CoreDuo is - but after all the pain 64 bit causes I really do not feel like figuring out... ;-)
Testing on annarchy.freedesktop.org. It produces Cody's, but not Andi's segfaults. Stepping thru the code now.
Created attachment 90051 [details] [review] Correctly use g_printf_string_upper_bound in g_string_append_vprintf The attached patch fixes the crash on annarchy. Andi: Can you test it on your box? Ryan: As you introduced g_printf_string_upper_bound with you patch I suggest to review your usages of g_printf_string_upper_bound. It has to operate on a private copy of the va_list.
=================== All 53 tests passed =================== Thanks, that did the trick. Sorry for being a blind man :-) Go, commit. (gprintfc.c:g_vasprintf does the same). (politics again: should i rather use accepted-commit_now---i assumed that is reserved for maintainers)
+ G_VA_COPY (sneak, args); huh. you learn something every day. i had no idea about this one. thanks for the catch :)