From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: potential bug in display_mode_element? Date: Mon, 12 Sep 2005 20:54:47 +0900 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1126526893 8358 80.91.229.2 (12 Sep 2005 12:08:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 12 Sep 2005 12:08:13 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Sep 12 14:08:08 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EEn48-0004p2-Uz for ged-emacs-devel@m.gmane.org; Mon, 12 Sep 2005 14:05:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EEn47-0006wp-UH for ged-emacs-devel@m.gmane.org; Mon, 12 Sep 2005 08:05:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EEmyn-0005tM-J5 for emacs-devel@gnu.org; Mon, 12 Sep 2005 08:00:10 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EEmyg-0005pO-IX for emacs-devel@gnu.org; Mon, 12 Sep 2005 08:00:05 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EEmyf-0005ib-4X for emacs-devel@gnu.org; Mon, 12 Sep 2005 08:00:01 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.34) id 1EEmub-0002K2-MM for emacs-devel@gnu.org; Mon, 12 Sep 2005 07:55:50 -0400 Original-Received: from nfs.m17n.org (nfs.m17n.org [192.47.44.7]) by tsukuba.m17n.org (8.13.4/8.13.4/Debian-3) with ESMTP id j8CBsoqu022426; Mon, 12 Sep 2005 20:54:50 +0900 Original-Received: from etlken (etlken.m17n.org [192.47.44.125]) by nfs.m17n.org (8.13.4/8.13.4/Debian-3) with ESMTP id j8CBsn7T025690; Mon, 12 Sep 2005 20:54:50 +0900 Original-Received: from handa by etlken with local (Exim 3.36 #1 (Debian)) id 1EEmtb-0005Dg-00; Mon, 12 Sep 2005 20:54:47 +0900 Original-To: storm@cua.dk (Kim F. Storm) In-reply-to: (storm@cua.dk) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.50 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:42837 Archived-At: In article , storm@cua.dk (Kim F. Storm) writes: > Kenichi Handa writes: >> I got a bug report for emacs-unicode-2, and it seems that >> the same bug exists in HEAD too. The backtrace is this: >> and never changed in the while loop. So the only reason I >> can think of why the address pointed by list_string becomes >> out of bound is that the string data of ELT was relocated in >> the loop and the original address was returned to OS. >> Actually, display_string is called in the loop, and it will >> run Lisp code. >> >> So, I think we meed this change. What do you think? > Bravo!! We definitely need this patch. I forgot to update lisp_string in that patch. So the attached one is better (and simpler). I've just installed it. --- Kenichi Handa handa@m17n.org 2005-09-12 Kenichi Handa * xdisp.c (display_mode_element): Be sure to make variables THIS and LISP_STRING point into a string data of ELT. *** xdisp.c 10 Sep 2005 09:35:12 +0900 1.1050 --- xdisp.c 12 Sep 2005 20:47:28 +0900 *************** *** 16171,16176 **** --- 16171,16178 ---- else /* c == 0 */ break; } + this += SDATA (elt) - lisp_string; + lisp_string = SDATA (elt); } } break;