a GTK-using application crashes, when LANG is set to non-UTF8

Ivan Klymenko fidaj at ukr.net
Sat Jul 3 08:39:42 UTC 2010


В Fri, 02 Jul 2010 23:30:58 -0400
"Mikhail T." <mi+thun at aldan.algebra.com> пишет:

> Joe Marcus Clarke написав(ла):
> >>     -CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
> >>     +CONFIGURE_ENV= CFLAGS="-D__STDC_ISO_10646__" \
> >>     +               CPPFLAGS="-I${LOCALBASE}/include" \
> >>       
> >>
> >> Or, perhaps, this can be controlled by the the glib20-port's
> >> "COLLATION_FIX" knob? If so, then it should be set /on/ by
> >> default...
> >>
> >> Would it speed things up, if I file an (urgent) PR regarding this?
> >> I think, it would be prudent to ship 8.1 with this problem
> >> resolved... Please, advise. Thanks!
> >>     
> >
> > What affects does this have on UTF-8 locales?  I briefly read
> > through the related Solaris bug, and it seems like adding this
> > definition could cause crashes for UTF-8 users.
> >   
> I believe, Ivan tested both on his system -- he own charset is usually
> UTF-8. Ivan, could you confirm, please?
> That said, I don't think, the Solaris bug mentions crashes for UTF-8
> users either way...
> 
> We need a solution of some sort. I'm surprised, this hasn't been
> reported yet... The utf8_collate function in glib, pretty much, has
> two different implementations #ifdef-ed by the __STDC_ISO_10646__. Can
> anybody on this thread ask the glib developers, what the right use of
> the define is?
> 
> Thanks!
> 
>     -mi

Hi!
Yes, I confirm that when I rebuilt the port devel/glib20 using the
patch:
--- Makefile.orig       2010-06-30 16:54:08.000000000 +0300
+++ Makefile    2010-06-30 16:59:21.000000000 +0300
@@ -44,7 +44,8 @@
                --disable-man --without-xml-catalog \
                --with-pcre=system \
                --disable-fam
-CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
+CONFIGURE_ENV= CFLAGS="-D__STDC_ISO_10646__" \
+               CPPFLAGS="-I${LOCALBASE}/include" \
                LDFLAGS="-L${LOCALBASE}/lib -lintl" \
                PTHREAD_CFLAGS="${PTHREAD_CFLAGS}" \
                PTHREAD_LIBS="${PTHREAD_LIBS}"
it is no longer cause an error in the function g_utf8_collate (), when
the system locale is set ru_RU.KOI8-P

Otherwise, get the following:

ivan at nonamehost# setenv LANG ru_RU.KOI8-R 
ivan at nonamehost# locale
LANG=ru_RU.KOI8-R
LC_CTYPE="ru_RU.KOI8-R"
LC_COLLATE="ru_RU.KOI8-R"
LC_TIME="ru_RU.KOI8-R"
LC_NUMERIC="ru_RU.KOI8-R"
LC_MONETARY="ru_RU.KOI8-R"
LC_MESSAGES="ru_RU.KOI8-R"
LC_ALL=
ivan at nonamehost# gdb cairo-dock 
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 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 "amd64-marcel-freebsd"...(no
debugging symbols found)... (gdb) run
Starting program: /usr/local/bin/cairo-dock 
(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...[New LWP 100235] (no debugging symbols found)...(no debugging
symbols found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...[New Thread 807c071c0 (LWP 100235)] (no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols found)...
============================================================================
Cairo-Dock version: 2.1.3-9 Compiled date:  Jun 26 2010 02:18:07
Running with OpenGL: 1
============================================================================

(no debugging symbols found)...(no debugging symbols found)...(no
debugging symbols found)...(no debugging symbols found)...(no debugging
symbols found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...(no debugging symbols
found)...(no debugging symbols found)...OpenGL config summary :
 - bNonPowerOfTwoAvailable : 1
 - bPBufferAvailable : 1
 - direct rendering : 1
 - bTextureFromPixmapAvailable : 1
 - GLX version : 1.4
 - OpenGL version: 3.3.0 NVIDIA 256.35
 - OpenGL vendor: NVIDIA Corporation
 - OpenGL renderer: GeForce 8400M GS/PCI/SSE2

activating pbuffer, usually buggy drivers will crash here ... ok, they
are fine enough. warning :
(cairo-dock-surface-factory.c:cairo_dock_create_surface_from_image:482)
�� ������� ������� ���� ?/usr/share/lmms/themes/default/icon.png?: ���
������ ����� ��� ������� cairo_dock_search_icon_s_path: assertion
`cFileName != NULL' failed warning :
(cairo-dock-surface-factory.c:cairo_dock_create_surface_from_image:482)
�� ������� �������
���� ?/usr/local/share/icons/Mac4Lin_Icons_v1.0/scalable/apps/zynaddsubfx_icon.ico?:
��� ������ ����� ��� ������� warning :
(cairo-dock-config.c:cairo_dock_get_integer_key_value:141) ���� ������
�� �������� ������ ?Module? cairo_dock_replace_values_in_conf_file
(/home/ivan/.config/cairo-dock/current_theme/plug-ins/stack/stack.conf)
[New Thread 807c09840 (LWP 100254)] separateur necessaire
_cd_find_volume_name_from_drive_name: assertion `pDrive != NULL' failed
cairo_dock_search_icon_s_path: assertion `cFileName != NULL' failed
g_convert: assertion `str != NULL' failed g_convert: assertion `str !=
NULL' failed g_convert: assertion `str != NULL' failed g_convert:
assertion `str != NULL' failed g_convert: assertion `str != NULL'
failed g_convert: assertion `str != NULL' failed

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 807c071c0 (LWP 100235)]
0x0000000805874c4c in strcmp () from /lib/libc.so.7
(gdb) info thread
  3 Thread 807c09840 (LWP 100254)  0x000000080587e97c in lstat ()
from /lib/libc.so.7
* 2 Thread 807c071c0 (LWP 100235)  0x0000000805874c4c in strcmp ()
from /lib/libc.so.7 (gdb) bt 2
#0  0x0000000805874c4c in strcmp () from /lib/libc.so.7
#1  0x000000080475449d in g_utf8_collate ()
from /usr/local/lib/libglib-2.0.so.0 (More stack frames follow...)
(gdb) 

sorry for my english

Thanks!


More information about the freebsd-gnome mailing list