GNOME Bugzilla – Bug 165526
Crashes with UTF-8 LC_COLLATE and non-UTF-8 LC_CTYPE in gtk_source_regex_search / search_patterns
Last modified: 2005-01-29 14:59:57 UTC
Hi, gedit crashes when syntax hilighting is turned on on for example the /usr/share/mime/applications/glade.xml file (I'll attach it) if you have set: LC_COLLATE="nl_NL.UTF-8@euro" (and you have to build the locale I presume, I did not have it when Debian bug <http://bugs.debian.org/290551> was filed.) I could not get a bt when run from gdb, bug seb128 had one: Backtrace was generated from '/home/seb128/gnome2/bin/gedit' Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1". `system-supplied DSO at 0xffffe000' has disappeared; keeping its symbols. [Thread debugging using libthread_db enabled] [New Thread -1225324384 (LWP 11923)] 0xffffe410 in __kernel_vsyscall ()
+ Trace 55033
Thread 1 (Thread -1225324384 (LWP 11923))
regards,
Created attachment 36660 [details] environment.txt This is a file you should source to set your locales to reproduce the bug, setting collation locale isn't enough, lc_ctype is required too.
Created attachment 36661 [details] glade.xml
export LC_COLLATE=fr_FR.UTF-8 export LC_CTYPE=fr_FR ... is enough
I might add that this doesn't only concern gedit. It happens in gnome-terminal too for instance, and I had some trouble with galeon which also leads back to this issue.
It seems to me a bug in gnu regex. Are gnome-terminal and galeon using gnu regex too?
It's difficult to tell for Galeon and gnome-terminal, grepping their sources isn't enough (as grepping gedit sources wouldn't show a call to re_*()). I do believe it's a bug in glibc, since we got all the segfaults from there, and multiple programs seem affected. Do you think you could reproduce the offending call in a short program?
the gedit crash is in gtksourceview. gnome-terminal and galeon make no sense for that bug, are you sure that's the crash ? I think that may be a different issue ... how do you get it ? Could you get a backtrace ?
I am closing this bug here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=261135 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=237681 Thanks for investigating!
loic: The re_* calls are in gtksourceview. seb: actually, it seems to me the crash is in re_search (or re_exec).
Paolo: yes I understood the re_*() calls are in gtksourceview, and this is why I meant it was not easy to check whether gnome-terminal and Galeon are using re_*() calls: even if their source code doesn't have such calls, they might do such calls indirectly (via another lib), and even if I check the binaries "galeon" and "gnome-terminal" and all their libs, a call or abscence of any call to re_*() functions doesn't prove anything. What I did not like in the stack trace is:
+ Trace 55062
(address out of bounds let me think libgksourceview broke a pointer or stack space at some point) But the fact that the problem is language specific and that the crash happens in functions in glibc that are called in the same way for all locales let me think this was not gtksourceview's fault. The bug reports on glibc in the Debian BTS confirmed this idea, and I'm pretty sure the problem is one of the two I quoted. I think the submitter should check whether a newer libc fixes all problems or provide stack traces for the other programs that crash on his machine. Bye,