After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 165526 - Crashes with UTF-8 LC_COLLATE and non-UTF-8 LC_CTYPE in gtk_source_regex_search / search_patterns
Crashes with UTF-8 LC_COLLATE and non-UTF-8 LC_CTYPE in gtk_source_regex_sear...
Status: RESOLVED NOTGNOME
Product: gtksourceview
Classification: Platform
Component: General
1.1.x
Other Linux
: High critical
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2005-01-28 17:37 UTC by Loïc Minier
Modified: 2005-01-29 14:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
environment.txt (323 bytes, text/plain)
2005-01-28 18:15 UTC, Loïc Minier
Details
glade.xml (1.14 KB, text/plain)
2005-01-28 18:19 UTC, Loïc Minier
Details

Description Loïc Minier 2005-01-28 17:37:14 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 ()

Thread 1 (Thread -1225324384 (LWP 11923))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/tls/i686/cmov/libpthread.so.0
  • #2 libgnomeui_segv_handle
    at gnome-ui-init.c line 741
  • #3 <signal handler called>
  • #4 re_exec
    from /lib/tls/i686/cmov/libc.so.6
  • #5 re_exec
    from /lib/tls/i686/cmov/libc.so.6
  • #6 re_exec
    from /lib/tls/i686/cmov/libc.so.6
  • #7 re_exec
    from /lib/tls/i686/cmov/libc.so.6
  • #8 re_exec
    from /lib/tls/i686/cmov/libc.so.6
  • #9 re_exec
    from /lib/tls/i686/cmov/libc.so.6
  • #10 re_search_2
    from /lib/tls/i686/cmov/libc.so.6
  • #11 re_search
    from /lib/tls/i686/cmov/libc.so.6
  • #12 gtk_source_regex_search
    at gtksourceregex.c line 139
  • #13 search_patterns
    at gtksourcebuffer.c line 2388
  • #14 check_pattern
    at gtksourcebuffer.c line 2505
  • #15 highlight_region
    at gtksourcebuffer.c line 2610
  • #16 ensure_highlighted
    at gtksourcebuffer.c line 2666
  • #17 idle_worker
    at gtksourcebuffer.c line 1520
  • #18 g_idle_dispatch
    at gmain.c line 3821
  • #19 g_main_dispatch
    at gmain.c line 1947
  • #20 IA__g_main_context_dispatch
    at gmain.c line 2497
  • #21 g_main_context_iterate
    at gmain.c line 2578
  • #22 IA__g_main_loop_run
    at gmain.c line 2782
  • #23 IA__gtk_main
    at gtkmain.c line 963
  • #24 main
    at gedit2.c line 390
  • #0 __kernel_vsyscall


regards,
Comment 1 Loïc Minier 2005-01-28 18:15:05 UTC
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.
Comment 2 Loïc Minier 2005-01-28 18:19:12 UTC
Created attachment 36661 [details]
glade.xml
Comment 3 Loïc Minier 2005-01-28 18:28:06 UTC
export LC_COLLATE=fr_FR.UTF-8
export LC_CTYPE=fr_FR
... is enough
Comment 4 jessevdk@gmail.com 2005-01-28 19:05:05 UTC
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.
Comment 5 Paolo Maggi 2005-01-29 10:15:36 UTC
It seems to me a bug in gnu regex. 

Are gnome-terminal and galeon using gnu regex too?
Comment 6 Loïc Minier 2005-01-29 10:43:45 UTC
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?
Comment 7 Sebastien Bacher 2005-01-29 10:47:47 UTC
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 ?
Comment 8 Loïc Minier 2005-01-29 10:51:49 UTC
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!
Comment 9 Paolo Maggi 2005-01-29 12:57:53 UTC
loic: The re_* calls are in gtksourceview.

seb: actually, it seems to me the crash is in re_search (or re_exec).

Comment 10 Loïc Minier 2005-01-29 14:59:57 UTC
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:

  • #12 gtk_source_regex_search
    at gtksourceregex.c line 139

(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,