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: composition bug Date: Thu, 18 Sep 2008 10:23:23 +0900 Message-ID: References: <87hc8rn3ws.fsf@cyd.mit.edu> <87r67u3k52.fsf@elegiac.orebokech.com> <87iqt53mk7.fsf@elegiac.orebokech.com> <87zlmcxsq1.fsf@elegiac.orebokech.com> <87zlm86191.fsf@elegiac.orebokech.com> <87prn457u2.fsf@elegiac.orebokech.com> <873ajy603u.fsf@elegiac.orebokech.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1221701027 7367 80.91.229.12 (18 Sep 2008 01:23:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Sep 2008 01:23:47 +0000 (UTC) Cc: cyd@stupidchicken.com, emacs-devel@gnu.org To: Romain Francoise Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 18 03:24:43 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Kg8G9-0006sc-9Y for ged-emacs-devel@m.gmane.org; Thu, 18 Sep 2008 03:24:41 +0200 Original-Received: from localhost ([127.0.0.1]:56684 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kg8F8-0007nJ-1z for ged-emacs-devel@m.gmane.org; Wed, 17 Sep 2008 21:23:38 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kg8F3-0007n9-HB for emacs-devel@gnu.org; Wed, 17 Sep 2008 21:23:33 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kg8F1-0007mx-SS for emacs-devel@gnu.org; Wed, 17 Sep 2008 21:23:32 -0400 Original-Received: from [199.232.76.173] (port=46281 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kg8F1-0007mu-Mf for emacs-devel@gnu.org; Wed, 17 Sep 2008 21:23:31 -0400 Original-Received: from mx1.aist.go.jp ([150.29.246.133]:59020) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kg8F1-0004es-9o for emacs-devel@gnu.org; Wed, 17 Sep 2008 21:23:31 -0400 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id m8I1NOIC013889; Thu, 18 Sep 2008 10:23:24 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp1.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id m8I1NOFm015981; Thu, 18 Sep 2008 10:23:24 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp1.aist.go.jp with ESMTP id m8I1NNMw018360; Thu, 18 Sep 2008 10:23:23 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.69) (envelope-from ) id 1Kg8Et-0002gk-LN; Thu, 18 Sep 2008 10:23:23 +0900 In-reply-to: <873ajy603u.fsf@elegiac.orebokech.com> (message from Romain Francoise on Wed, 17 Sep 2008 21:31:01 +0200) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-detected-operating-system: by monty-python.gnu.org: Solaris 9 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:103927 Archived-At: In article <873ajy603u.fsf@elegiac.orebokech.com>, Romain Francoise writes: > Kenichi Handa writes: > > (gdb) br composite.c:1432 > Thanks, I should have started there because the problem was > immediately obvious when in gdb: an EMACS_INT arg was being > given the literal -1, which is int. On my machine (amd64), > EMACS_INT is long and due to the traditional function prototype > the value isn't casted automatically. I installed a fix. Ah!!! Thank you for fixing it. > By the way, it looks like the functions in this file use int for > buffer positions in many places, there could be other bugs like this > one. Building with `-Wtraditional-conversion' on amd64 finds quite > a few occurrences of width mismatch. I'm always confused by int and EMACS_INT. "struct it" and "struct text_pos" in dispextern.h uses "int" for buffer/string positions, and xdisp.c calls functions in composite.c with those values. So, there exist mixture of int and EMACS_INT. Shouldn't all of them use EMACS_INT for positions (and perhaps for string length)? --- Kenichi Handa handa@ni.aist.go.jp