unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: mwd@md5i.com, Kenichi Handa <handa@gnu.org>
Cc: mwd@cert.org, 23522@debbugs.gnu.org
Subject: bug#23522: 25.0.93; SEGFAULT when displaying HELLO
Date: Fri, 13 May 2016 10:46:36 +0300	[thread overview]
Message-ID: <8337pm9z8j.fsf@gnu.org> (raw)
In-Reply-To: <87wpmzgfxw.fsf@md5i.com> (message from Michael Welsh Duggan on Thu, 12 May 2016 16:49:15 -0400)

> From: Michael Welsh Duggan <mwd@md5i.com>
> Cc: Michael Welsh Duggan <mwd@cert.org>,  <rgm@gnu.org>,  <23522@debbugs.gnu.org>
> Date: Thu, 12 May 2016 16:49:15 -0400
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Michael Welsh Duggan <mwd@cert.org>
> >> Cc: <rgm@gnu.org>, <23522@debbugs.gnu.org>
> >> Date: Thu, 12 May 2016 15:58:43 -0400
> >> 
> >> (gdb) up
> >> #4  0x00000000006b47e2 in ftfont_shape_by_flt (lgstring=14496901, 
> >>     font=0x17b3660, ft_face=0x1739f10, otf=0x16df8d0, matrix=0x17b3758)
> >>     at ../../../git/emacs/src/ftfont.c:2655
> >> (gdb) pp lgstring
> >> [[#<font-object "-unknown-Lohit
> >> Gujarati-normal-normal-normal-*-13-*-*-*-*-0-iso10646-1"> 2744 2765
> >> 2724 2759] nil [0 0 2744 98 10 0 9 8 0 nil] [1 1 2765 115 0 -4 3 0 4
> >> nil] [2 2 2724 81 9 0 8 8 0 nil] [3 3 2759 110 0 -7 -1 12 -7 nil]
> >> nil nil nil nil]
> >> (gdb) 
> >
> > In the above stack frame, what is the value of g->g (it's a
> > structure)?
> 
> (gdb) p g->g
> $3 = {
>   c = 0, 
>   code = 175, 
>   from = 0, 
>   to = 115, <<<<<<<<<<<<<<<<<<<<<<

This value of 'to' looks bogus (too large) to me.  The line that
segfaults is

      g->g.to = LGLYPH_TO (LGSTRING_GLYPH (lgstring, g->g.to));

and the LGSTRING_GLYPH macro expands to AREF (lgstring, g->g.to+2), so
we are indexing an lgstring with an index that's 117, too large.  The
value of lgstring shown above has only 10 elements, which is
consistent with the definition of an lgstring (see composite.h, around
line 270).

So the question becomes: where did that value of 'to' come from, and
how come its value is bogus?  Can you look at the code before the
faulting line and figure that out?

I'm CC'ing Handa-san, who might have insight for this problem.

> > The crash seems to happen when Emacs tries to display line #10 of
> > HELLO, which begins with " South Asia:".  The first word after that is
> > the one that causes the crash.  Can you look at another system, where
> > there's no crash, and tell which font is used for that word?
> 
> Looking at previous frames, it looks like the character is char 383:

That's right.

>              position: 383 of 3322 (11%), column: 16
>             character: સ (displayed as સ) (codepoint 2744, #o5270, #xab8)
>     preferred charset: mule-unicode-0100-24ff (Unicode characters of the range U+0100..U+24FF.)
> code point in charset: 0x3978
>                script: gujarati
>                syntax: w 	which means: word
>              category: .:Base, L:Left-to-right (strong)
>              to input: type "C-x 8 RET ab8" or "C-x 8 RET GUJARATI LETTER SA"
>           buffer code: #xE0 #xAA #xB8
>             file code: ESC #x24 #x2C #x31 #x39 #x78 (encoded by coding system iso-2022-7bit-unix)
>               display: composed to form "સ્તે" (see below)
> 
> Composed with the following character(s) "્તે" using this font:
>   xft:-unknown-FreeSerif-normal-normal-normal-*-15-*-*-*-*-0-iso10646-1
> by these glyphs:
>   [0 3 0 10195 9 0 10 10 0 nil]
>   [0 3 2724 2103 10 1 10 10 1 nil]
>   [0 3 2759 2132 0 -8 -2 13 -10 [-1 0 0]]

So why does Emacs use FreeSerif on this system and Lohit Gujarati on
the faulting one?  Are both fonts installed on both systems?  Is Lohit
Gujarati a bad font, by any chance?

Also, do both systems have the same version of libm17n-flt and m17n-db
libraries?





  reply	other threads:[~2016-05-13  7:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 13:05 bug#23522: 25.0.93; SEGFAULT when displaying HELLO Michael Welsh Duggan
2016-05-12 16:40 ` Glenn Morris
2016-05-12 17:23   ` Michael Welsh Duggan
2016-05-12 19:16     ` Eli Zaretskii
2016-05-12 19:58       ` Michael Welsh Duggan
2016-05-12 20:28         ` Eli Zaretskii
2016-05-12 20:49           ` Michael Welsh Duggan
2016-05-13  7:46             ` Eli Zaretskii [this message]
2016-05-13 14:52               ` Michael Welsh Duggan
2016-05-13 15:14                 ` Eli Zaretskii
2016-05-13 18:06                   ` Michael Welsh Duggan
2016-05-13 18:53                     ` Eli Zaretskii
2016-05-13 19:17                       ` Michael Welsh Duggan
2019-11-08  4:22                         ` Stefan Kangas
2019-11-08 10:30                           ` Eli Zaretskii
2019-11-08 15:16                             ` Michael Welsh Duggan
2019-11-09  7:45                               ` Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8337pm9z8j.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=23522@debbugs.gnu.org \
    --cc=handa@gnu.org \
    --cc=mwd@cert.org \
    --cc=mwd@md5i.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).