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 129741 - render_syllable crash at hangul-fc.c:249
render_syllable crash at hangul-fc.c:249
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: hangul
1.4.x
Other Linux
: High critical
: 1.4.1
Assigned To: Changwoo Ryu
pango-maint
: 134264 137396 138446 145164 145662 146480 146771 146984 147007 147088 147289 148945 157478 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-12-20 18:16 UTC by Mitch
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Mitch 2003-12-20 18:16:11 UTC
I was reading the comp.os.linux.announce newsgroup and found that
my newsreader 'pan' was crashing in pango code whenever i loaded the
newsgroup.

I rebuilt pango with debugging enabled and here is the crash:

core ~% gdb pan
GNU gdb 5.3
Copyright 2002 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 "i686-pc-linux-gnu"...(no debugging symbols
found)...(gdb) r
Starting program: /usr/local/bin/pan
[New Thread 16384 (LWP 29194)]
[New Thread 32769 (LWP 29195)]
[New Thread 16386 (LWP 29196)]
[New Thread 32771 (LWP 29197)]
[New Thread 49156 (LWP 29198)]
[New Thread 65541 (LWP 29199)]
[New Thread 81926 (LWP 29200)]
[New Thread 98311 (LWP 29201)]
[New Thread 114696 (LWP 29204)]
 
Program received signal SIGSEGV, Segmentation fault.

Thread 16384 (LWP 29194)

  • #0 render_syllable
    at hangul-fc.c line 249
  • #1 hangul_engine_shape
    at hangul-fc.c line 355
  • #2 _pango_engine_shape_shape
    at pango-engine.c line 73
  • #3 pango_shape
    at shape.c line 47
  • #4 process_item
    at pango-layout.c line 2583
  • #5 process_line
    at pango-layout.c line 2751
  • #6 pango_layout_check_lines
    at pango-layout.c line 3023
  • #7 pango_layout_get_extents_internal
    at pango-layout.c line 1885
  • #8 pango_layout_get_extents
    at pango-layout.c line 2010
  • #9 pango_layout_get_pixel_extents
    at pango-layout.c line 2033
  • #10 gtk_ctree_get_type
    from /usr/local/lib/libgtk-x11-2.0.so.0
  • #11 gtk_clist_undo_selection
    from /usr/local/lib/libgtk-x11-2.0.so.0
  • #12 gtk_clist_undo_selection
    from /usr/local/lib/libgtk-x11-2.0.so.0
  • #13 gtk_clist_thaw
    from /usr/local/lib/libgtk-x11-2.0.so.0
  • #14 articlelist_selected_flag_for_dl_nolock
  • #15 articlelist_refresh
  • #16 pan_timeout_add
  • #17 pan_error_dialog
  • #18 g_timeout_dispatch
    from /usr/local/lib/libglib-2.0.so.0
  • #19 g_main_dispatch
    from /usr/local/lib/libglib-2.0.so.0
  • #20 g_main_context_dispatch
    from /usr/local/lib/libglib-2.0.so.0
  • #21 g_main_context_iterate
    from /usr/local/lib/libglib-2.0.so.0#22
  • #23 gtk_main
    from /usr/local/lib/libgtk-x11-2.0.so.0
  • #24 main
  • #25 __libc_start_main
    from /lib/libc.so.6
$1 = 0
(gdb) print jindex
$2 = 7936
(gdb) print __jamo_to_ksc5601[jindex]
Cannot access memory at address 0x40bc81c0

Looks like we've walked off the end of the array ?

This is 100% reproduceable (well right now anyhow until i guess the
article expires, so am looking for a quick fix since i can test easily)
Comment 1 Mitch 2003-12-20 18:38:30 UTC
More debugging. 

Looks like __jamo_to_ksc5601[][] is [0x100][3], so only 256x3 long,
though our jindex is 7936 - so definetly walking off the end of the
array. From the source jindex is calculated as

      jindex = text[i] - LBASE;
and
(gdb) p i
$13 = 3
(gdb) print text[3]
$16 = 12288
(gdb) print text[3]-0x1100
$17 = 7936

maybe we should change
  for (j = 0; j < 3 && (__jamo_to_ksc5601[jindex][j] != 0); j++)
to
  for (j = 0; jindex < 0x100 && j < 3 && (__jamo_to_ksc5601[jindex][j]
!= 0); j++)

Probably a good check to have even if 'pan' is passing us duff 
unicode text.
Comment 2 Owen Taylor 2004-02-12 22:54:55 UTC
*** Bug 134264 has been marked as a duplicate of this bug. ***
Comment 3 aaron 2004-02-13 21:04:00 UTC
I don't know if this is relevant, but this happens regardless of my
character-set... I don't get a lot of mail in non-latin alphabets...
this crashes a variety of other applications, too. Thanks for looking
into this!
Comment 4 aaron 2004-02-19 15:24:31 UTC
Upgrading from fontconfig 2.2.1-58    to fontconfig
2.2.1-58.ximian.8.2 seems to have fixed my problem, although I'm not
sure why.
Comment 5 Luis Villa 2004-03-01 22:09:38 UTC
Mitch, are you still seeing this? 
Comment 6 Owen Taylor 2004-03-01 23:52:34 UTC
This has nothing to do with fontconfig except coincidentally.
I think we have sufficient information to come up with a patch
from the above.
Comment 7 Mitch 2004-03-02 03:31:22 UTC
Yup i'm still here... Mitch
Comment 8 Owen Taylor 2004-03-29 14:49:53 UTC
*** Bug 137396 has been marked as a duplicate of this bug. ***
Comment 9 Peter O'Shea 2004-03-29 14:57:27 UTC
My dupe is on Solaris 8, so should OS be "all"?
Comment 10 Owen Taylor 2004-03-29 16:04:02 UTC
Once we have a diagnosis on the bug as we do here, the OS field is really 
completely irrelevant :-)
Comment 11 Gerardo Marin 2004-04-14 00:04:59 UTC
This is causing major problems in Evolution too. See
http://bugzilla.ximian.com/show_bug.cgi?id=53592 (21 duplicates)
Comment 12 Changwoo Ryu 2004-04-17 04:07:47 UTC
Sorry for the long delay.  But I still don't understand why this happened. 
Please help if anyone can.

Why was U+3000 (text[3] = 12288) put into hangul module?  It's definitely out of
the range of hangul module.
Comment 13 Owen Taylor 2004-04-17 13:25:48 UTC
Not sure offhand what U+3000 is, but with Pango-1.4 all modules basically
should be capable of handling any input Unicode character; while the
Hangul shaper isn't going to get Han characters or roman characters in
the normal case, it will get spaces, punctuation, combining marks if
they are supported by the font.

This is to:

 - Allow shapers to to do necessary tasks with control characters
   like ZWJ/ZWNJ/variant selectors
 - Make sure that combining marks go to the right font
 - Improve performance by not doing things like putting spaces
   in different runs than words.

The Hangul module can do very simple fallback rendering of such characters,
but it does need to handle them.
Comment 14 Changwoo Ryu 2004-04-17 16:11:02 UTC
I see.  It also explains bug 137347.
Comment 15 Changwoo Ryu 2004-04-17 16:19:31 UTC
I believe it was fixed in CVS now.

2004-04-18  Changwoo Ryu  <cwryu@debian.org>

	* modules/hangul/hangul-defs.h (IS_JAMO): 
	* modules/hangul/hangul-fc.c (hangul_engine_shape, render_basic):
	handle non-Hangul unicode chars, fixes #129741,	#137347.
Comment 16 Owen Taylor 2004-06-23 21:11:01 UTC
*** Bug 138446 has been marked as a duplicate of this bug. ***
Comment 17 Crispin Flowerday (not receiving bugmail) 2004-07-04 16:36:42 UTC
*** Bug 145164 has been marked as a duplicate of this bug. ***
Comment 18 Peter Zelezny 2004-07-05 05:07:01 UTC
Please consider a 1.4.1 release with this fixed ASAP. People are now being
crashed from remote when using XChat with a single line of Korean text.
Comment 19 Christian Persch 2004-07-08 17:32:52 UTC
*** Bug 145662 has been marked as a duplicate of this bug. ***
Comment 20 Crispin Flowerday (not receiving bugmail) 2004-07-09 07:29:22 UTC
*** Bug 146480 has been marked as a duplicate of this bug. ***
Comment 21 Tommi Komulainen 2004-07-10 08:54:09 UTC
*** Bug 146771 has been marked as a duplicate of this bug. ***
Comment 22 Yanko Kaneti 2004-07-10 17:48:54 UTC
*** Bug 147289 has been marked as a duplicate of this bug. ***
Comment 23 Crispin Flowerday (not receiving bugmail) 2004-07-11 19:33:19 UTC
*** Bug 146984 has been marked as a duplicate of this bug. ***
Comment 24 Crispin Flowerday (not receiving bugmail) 2004-07-11 19:33:34 UTC
*** Bug 147007 has been marked as a duplicate of this bug. ***
Comment 25 Crispin Flowerday (not receiving bugmail) 2004-07-11 19:34:50 UTC
*** Bug 147088 has been marked as a duplicate of this bug. ***
Comment 26 Changwoo Ryu 2004-07-31 19:24:52 UTC
*** Bug 148945 has been marked as a duplicate of this bug. ***
Comment 27 Elijah Newren 2004-11-08 20:55:52 UTC
*** Bug 157478 has been marked as a duplicate of this bug. ***