From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jason Rumney Newsgroups: gmane.emacs.devel Subject: Re: segmentation fault displaying etc/HELLO on Windows Date: Wed, 30 Jul 2008 14:11:01 +0100 Message-ID: <48906865.4000808@gnu.org> References: <48900ED2.2000703@gnu.org> <4890670C.9000009@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1217423498 7792 80.91.229.12 (30 Jul 2008 13:11:38 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Jul 2008 13:11:38 +0000 (UTC) Cc: emacs- devel To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 30 15:12:27 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 1KOBTa-0003WD-3G for ged-emacs-devel@m.gmane.org; Wed, 30 Jul 2008 15:12:22 +0200 Original-Received: from localhost ([127.0.0.1]:47244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KOBSf-00014x-Kc for ged-emacs-devel@m.gmane.org; Wed, 30 Jul 2008 09:11:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KOBSa-00013I-Vi for emacs-devel@gnu.org; Wed, 30 Jul 2008 09:11:21 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KOBSZ-000111-7D for emacs-devel@gnu.org; Wed, 30 Jul 2008 09:11:20 -0400 Original-Received: from [199.232.76.173] (port=50216 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KOBSY-00010m-SG for emacs-devel@gnu.org; Wed, 30 Jul 2008 09:11:18 -0400 Original-Received: from mk-outboundfilter-4.mail.uk.tiscali.com ([212.74.114.32]:5696) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KOBSY-0001mm-Fz for emacs-devel@gnu.org; Wed, 30 Jul 2008 09:11:18 -0400 Original-X-Trace: 117121069/mk-outboundfilter-2.mail.uk.tiscali.com/F2S/$F2S-ACCEPTED/f2s-freedom2Surf-customers/83.67.23.108 X-SBRS: None X-RemoteIP: 83.67.23.108 X-IP-MAIL-FROM: jasonr@gnu.org X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EAOUEkEhTQxds/2dsb2JhbACBW4lEpwQ X-IronPort-AV: E=Sophos;i="4.31,279,1215385200"; d="scan'208";a="117121069" X-IP-Direction: IN Original-Received: from i-83-67-23-108.freedom2surf.net (HELO wanchan.jasonrumney.net) ([83.67.23.108]) by smtp.f2s.tiscali.co.uk with ESMTP; 30 Jul 2008 14:11:17 +0100 Original-Received: from [192.168.249.27] (chiko.jasonrumney.net [192.168.249.27]) by wanchan.jasonrumney.net (Postfix) with ESMTP id D1D501B7; Wed, 30 Jul 2008 14:11:49 +0100 (BST) User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) In-Reply-To: <4890670C.9000009@gnu.org> X-Enigmail-Version: 0.95.6 OpenPGP: id=8086879D X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. 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:101748 Archived-At: Jason Rumney wrote: > Juanma Barranquero wrote: > >> 3) So I thought, let's do a non-optimizing build. This time I >> bootstrapped (at work) with system-configuration-options "--with-gcc >> (4.3) --no-opt --cflags -DENABLE_CHECKING=1 >> -DSITELOAD_PURESIZE_EXTRA=200000 -IC:/emacs/build/include". Now Emacs >> does *not* crash. > > That might explain why I don't see any crashes. I suspect the problem > lies in the changes made to uniscribe_encode_char, so I'll review those. > I did resize some buffers a couple of times while writing the code, and > may have ended up with inconsistent sizing. Indeed, that was the problem. I reduced the buffer size to 1, since characters that produce multiple glyphs can't be handled properly by uniscribe_encode_char, but passed in a size of 20 (a number I'd picked after I'd come across Indic characters that produce more than the 2 glyphs I'd originally allowed for) to the system function. It might explain some of the unexplained display corruption I was seeing with some Indic characters that I had to work around, so I may be able to simplify that function now.