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: regex.c bug? - Re: HTML Mode and Turkish Locale - Segfault Date: Thu, 30 Nov 2006 11:09:57 +0900 Message-ID: References: <871wnqncwa.fsf@medic.epidio.net> <87r6vm3yrw.fsf@medic.epidio.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1164852667 1813 80.91.229.2 (30 Nov 2006 02:11:07 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 30 Nov 2006 02:11:07 +0000 (UTC) Cc: eliz@gnu.org, emacs-devel@gnu.org, monnier@iro.umontreal.ca, cfb@cafer.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 30 03:11:01 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GpbO5-0002sn-IN for ged-emacs-devel@m.gmane.org; Thu, 30 Nov 2006 03:10:57 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GpbO4-000732-Uj for ged-emacs-devel@m.gmane.org; Wed, 29 Nov 2006 21:10:57 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GpbNp-00070w-LL for emacs-devel@gnu.org; Wed, 29 Nov 2006 21:10:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GpbNm-0006xd-Dg for emacs-devel@gnu.org; Wed, 29 Nov 2006 21:10:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GpbNm-0006xS-4P for emacs-devel@gnu.org; Wed, 29 Nov 2006 21:10:38 -0500 Original-Received: from [150.29.246.133] (helo=mx1.aist.go.jp) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GpbNh-0007LX-Nk; Wed, 29 Nov 2006 21:10:34 -0500 Original-Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id kAU28seE004884; Thu, 30 Nov 2006 11:08:54 +0900 (JST) env-from (handa@m17n.org) Original-Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id kAU28sBc012754; Thu, 30 Nov 2006 11:08:54 +0900 (JST) env-from (handa@m17n.org) Original-Received: by smtp3.aist.go.jp with ESMTP id kAU28qlF012227; Thu, 30 Nov 2006 11:08:52 +0900 (JST) env-from (handa@m17n.org) Original-Received: from handa by etlken.m17n.org with local (Exim 4.63) (envelope-from ) id 1GpbN7-0002Rg-6j; Thu, 30 Nov 2006 11:09:57 +0900 Original-To: cfb@cafer.org (Cafer =?UTF-8?B?xZ5pbcWfZWs=?=) In-reply-to: <87r6vm3yrw.fsf@medic.epidio.net> (cfb@cafer.org) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/22.0.91 (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:63092 Archived-At: In article <87r6vm3yrw.fsf@medic.epidio.net>, cfb@cafer.org (Cafer =C5=9Eim= =C5=9Fek) writes: > I'm getting SegFault already. I've just installed the simlar fix to another place using SET_LIST_BIT. So, please try the latest code again. --- Kenichi Handa handa@m17n.org > Program received signal SIGSEGV, Segmentation fault. > 0x080e400a in re_set_syntax () > (gdb) > I want to help to fix it, so how can I compile Emacs with debug > symbols? > Best Regards. > Stefan Monnier writes: >>> In tr_TR.UTF-8, 'I' is translated to #x51051 (U+0131). But, >>> it seems that SET_LIST_BIT assumes that the argument is less >>> than 256 (or 128). So, I've just installed the following change. > > >>> @@ -2939,7 +2939,8 @@ >>> for (ch =3D 0; ch < 1 << BYTEWIDTH; ++ch) >>> { >>> int translated =3D TRANSLATE (ch); >>> - if (re_iswctype (btowc (ch), cc)) >>> + if (translated < (1 << BYTEWIDTH) >>> + && re_iswctype (btowc (ch), cc)) >>> SET_LIST_BIT (translated); >>> } > > >>> If translated is set to a mutibyte character, I think the >>> above SET_RANGE_TABLE_WORK_AREA_BIT handles such a case. > > >>> Stefan, could you please confirm that my guess above is >>> correct? > > > > That looks correct, yes. Thank you, > > > > > > Stefan > --=20 > maybe you want to lost (lene) > Cafer 'cfb' =C5=9Eim=C5=9Fek > http://cafer.org