Subject: bug#16457: 24.3.50; crash rendering Arabic Uthmani script

From: [email-masked] (K. Handa)
Date: Sun, 19 Jan 2014 22:45:38 +0900

In article <[email-masked]>, Dmitry Antipov <[email-masked]> writes:

> Run 'emacs -Q', then visit attached file and eval '(move-to-column 10)' ==>

> #0  0x00000034d9e0f62b in raise (sig=11) at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
> #1  0x00000000005644fb in terminate_due_to_signal (sig=11, backtrace_limit=40) at ../../trunk/src/emacs.c:378
> #2  0x000000000058e5c8 in handle_fatal_signal (sig=11) at ../../trunk/src/sysdep.c:1628
> #3  0x000000000058e59d in deliver_thread_signal (sig=11, handler=0x58e5ae <handle_fatal_signal>) at ../../trunk/src/sysdep.c:1602
> #4  0x000000000058e5fe in deliver_fatal_thread_signal (sig=11) at ../../trunk/src/sysdep.c:1640
> #5  <signal handler called>
> #6  0x000000000056134d in PSEUDOVECTOR_TYPEP (a=0x400000000d000040, code=14) at ../../trunk/src/lisp.h:2377
> #7  0x00000000005613bd in PSEUDOVECTORP (a=..., code=14) at ../../trunk/src/lisp.h:2391
> #8  0x00000000005614d4 in SUB_CHAR_TABLE_P (a=...) at ../../trunk/src/lisp.h:2449

I can't reproduce it.  I tried to set Arabic font to 'DejaVu
Sans Mono' and 'PakType Naqsh' (they are shown in your
bug16457_debug.log), but Emacs didn't crash.  ???

But, by checking my latest change again, I noticed a silly
mistake :-(, and just installed the following patch.

=== modified file 'src/composite.c'
--- src/composite.c	2014-01-12 23:23:55 +0000
+++ src/composite.c	2014-01-19 13:24:59 +0000
@@ -1412,7 +1412,7 @@
       cmp_it->width = 0;
       for (i = cmp_it->nchars - 1; i >= 0; i--)
 	{
-	  c = XINT (LGSTRING_CHAR (gstring, cmp_it->from + i));
+	  c = XINT (LGSTRING_CHAR (gstring, from + i));
 	  cmp_it->nbytes += CHAR_BYTES (c);
 	  cmp_it->width += CHAR_WIDTH (c);
 	}

Coud you please try agian with the latest trunk code?

---
Kenichi Handa
[email-masked]