From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 13 16:26:52 2011 Received: (at submit) by debbugs.gnu.org; 13 Sep 2011 20:26:52 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3ZZE-00048f-Cc for submit@debbugs.gnu.org; Tue, 13 Sep 2011 16:26:52 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3ZZC-00048Y-0a for submit@debbugs.gnu.org; Tue, 13 Sep 2011 16:26:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3ZUq-00015O-GX for submit@debbugs.gnu.org; Tue, 13 Sep 2011 16:22:21 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:34991) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3ZUq-00015K-Cj for submit@debbugs.gnu.org; Tue, 13 Sep 2011 16:22:20 -0400 Received: from eggs.gnu.org ([140.186.70.92]:52098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3ZUo-0005bK-Rn for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 16:22:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3ZUn-00014v-M6 for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 16:22:18 -0400 Received: from smtprelay-b11.telenor.se ([62.127.194.20]:37260) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3ZUn-00014h-BR for bug-gnu-emacs@gnu.org; Tue, 13 Sep 2011 16:22:17 -0400 Received: from ipb1.telenor.se (ipb1.telenor.se [195.54.127.164]) by smtprelay-b11.telenor.se (Postfix) with ESMTP id DE0B7EAD38 for ; Tue, 13 Sep 2011 22:22:15 +0200 (CEST) X-SMTPAUTH-B2: [bocjoh] X-SENDER-IP: [85.228.206.69] X-LISTENER: [smtp.bredband.net] X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AmJvAMS6b05V5M5FPGdsb2JhbABChFWERpAKjkoLAQEBATczgX0EL1gCBSECEQEEGAEMCi2HeZgGjWCRcYEshDGBEQSkYQ X-IronPort-AV: E=Sophos;i="4.68,375,1312149600"; d="scan'208";a="218966857" Received: from c-45cee455.04-211-6c6b701.cust.bredbandsbolaget.se (HELO muon.localdomain) ([85.228.206.69]) by ipb1.telenor.se with ESMTP; 13 Sep 2011 22:22:15 +0200 Received: by muon.localdomain (Postfix, from userid 1000) id E266548458B; Tue, 13 Sep 2011 22:22:14 +0200 (CEST) From: =?utf-8?Q?Johan_Bockg=C3=A5rd?= To: bug-gnu-emacs@gnu.org Subject: 24.0.50; Segfault on TAB-only composition Date: Tue, 13 Sep 2011 22:22:14 +0200 Message-ID: <8739g0tcp5.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.7 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.7 (----) (insert (compose-string "\t")) Program received signal SIGSEGV, Segmentation fault. 0x00000000004d45d4 in x_set_glyph_string_gc (s=3D0x7fffffffae80) at xterm.c= :1061 1061 PREPARE_FACE_FOR_DISPLAY (s->f, s->face); (gdb) bt #0 0x00000000004d45d4 in x_set_glyph_string_gc (s=3D0x7fffffffae80) at xterm.c:1061 #1 x_draw_glyph_string (s=3D0x7fffffffae80) at xterm.c:2683 This problem is not new, but due to other changes it now makes `describe-char' (C-u C-x =3D) crash when executed on a tab character. 2011-09-13 Johan Bockg=C3=A5rd * xdisp.c (fill_composite_glyph_string): Always set s->face, to avoid a crash. =3D=3D=3D modified file 'src/xdisp.c' --- src/xdisp.c 2011-09-09 01:06:52 +0000 +++ src/xdisp.c 2011-09-11 15:03:56 +0000 @@ -21745,6 +21749,12 @@ fill_composite_glyph_string (struct glyp } s->cmp_to =3D i; =20 + if (s->face =3D=3D NULL) + { + s->face =3D base_face->ascii_face; + s->font =3D s->face->font; + } + /* All glyph strings for the same composition has the same width, i.e. the width set for the first component of the composition. */ s->width =3D s->first_glyph->pixel_width; From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 14 01:38:18 2011 Received: (at 9496) by debbugs.gnu.org; 14 Sep 2011 05:38:18 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3iAs-0003XG-HP for submit@debbugs.gnu.org; Wed, 14 Sep 2011 01:38:18 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3iAq-0003X9-8N for 9496@debbugs.gnu.org; Wed, 14 Sep 2011 01:38:17 -0400 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1R3i6N-0006kA-0X; Wed, 14 Sep 2011 01:33:39 -0400 Date: Wed, 14 Sep 2011 01:33:39 -0400 Message-Id: From: Eli Zaretskii To: Johan =?utf-8?Q?Bockg=C3=A5rd?= , handa@m17n.org In-reply-to: <8739g0tcp5.fsf@gnu.org> (message from Johan =?utf-8?Q?Bockg?= =?utf-8?Q?=C3=A5rd?= on Tue, 13 Sep 2011 22:22:14 +0200) Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition References: <8739g0tcp5.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: 9496 Cc: 9496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) > From: Johan Bockgård > Date: Tue, 13 Sep 2011 22:22:14 +0200 > > > (insert (compose-string "\t")) > > Program received signal SIGSEGV, Segmentation fault. > 0x00000000004d45d4 in x_set_glyph_string_gc (s=0x7fffffffae80) at xterm.c:1061 > 1061 PREPARE_FACE_FOR_DISPLAY (s->f, s->face); > (gdb) bt > #0 0x00000000004d45d4 in x_set_glyph_string_gc (s=0x7fffffffae80) > at xterm.c:1061 > #1 x_draw_glyph_string (s=0x7fffffffae80) at xterm.c:2683 > > This problem is not new, but due to other changes it now makes > `describe-char' (C-u C-x =) crash when executed on a tab character. > > > 2011-09-13 Johan Bockgård > > * xdisp.c (fill_composite_glyph_string): Always set s->face, to > avoid a crash. Thanks. But why not use the value of face_id computed in the loop above the locus of your patch (which does that for any character but the TAB)? Anyway, there's some magic about the TAB character and compositions that I always wondered about. Perhaps it's time to find out why composition-related code tests characters against the TAB in so many places. Handa-san, can you tell why, please? From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 14 09:02:31 2011 Received: (at 9496) by debbugs.gnu.org; 14 Sep 2011 13:02:32 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3p6l-0003qe-3M for submit@debbugs.gnu.org; Wed, 14 Sep 2011 09:02:31 -0400 Received: from mx1.aist.go.jp ([150.29.246.133]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3p6g-0003qU-Tk for 9496@debbugs.gnu.org; Wed, 14 Sep 2011 09:02:29 -0400 Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id p8ECvqMr020212; Wed, 14 Sep 2011 21:57:52 +0900 (JST) env-from (handa@m17n.org) Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id p8ECvqEf011700; Wed, 14 Sep 2011 21:57:52 +0900 (JST) env-from (handa@m17n.org) Received: by smtp4.aist.go.jp with ESMTP id p8ECvpjR021546; Wed, 14 Sep 2011 21:57:51 +0900 (JST) env-from (handa@m17n.org) From: Kenichi Handa To: Eli Zaretskii Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition In-Reply-To: (message from Eli Zaretskii on Wed, 14 Sep 2011 01:33:39 -0400) Date: Wed, 14 Sep 2011 21:57:04 +0900 Message-ID: <87pqj31dun.fsf@m17n.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 9496 Cc: 9496@debbugs.gnu.org, bojohan@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) In article , Eli Zaretskii writes: > Anyway, there's some magic about the TAB character and compositions > that I always wondered about. Perhaps it's time to find out why > composition-related code tests characters against the TAB in so many > places. Handa-san, can you tell why, please? The usage of TAB in composition is described in the docstring of compose-region as this: ---------------------------------------------------------------------- (compose-region START END &optional COMPONENTS MODIFICATION-FUNC) Compose characters in the current region. [...] Optional 3rd argument COMPONENTS, if non-nil, is a character, a string or a vector or list of integers and rules. [...] If it is a string, the elements are alternate characters. In this case, TAB element has a special meaning. If the first character is TAB, the glyphs are displayed with left padding space so that no pixel overlaps with the previous column. If the last character is TAB, the glyphs are displayed with right padding space so that no pixel overlaps with the following column. ---------------------------------------------------------------------- This feature is typically used in describe-char to avoid a single combining character overlapping with the surrounding characters. By the way, I'm sorry for not actively working on bug reports related to codes written by me. I'm now extremely overloaded. --- handa@m17n.org From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 14 09:12:25 2011 Received: (at 9496) by debbugs.gnu.org; 14 Sep 2011 13:12:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3pGK-00044T-MV for submit@debbugs.gnu.org; Wed, 14 Sep 2011 09:12:25 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3pGI-00044L-Bv for 9496@debbugs.gnu.org; Wed, 14 Sep 2011 09:12:23 -0400 Received: from eliz by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1R3pBs-0004FS-6i; Wed, 14 Sep 2011 09:07:48 -0400 Date: Wed, 14 Sep 2011 09:07:48 -0400 Message-Id: From: Eli Zaretskii To: Kenichi Handa In-reply-to: <87pqj31dun.fsf@m17n.org> (message from Kenichi Handa on Wed, 14 Sep 2011 21:57:04 +0900) Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition References: <87pqj31dun.fsf@m17n.org> X-Spam-Score: -6.6 (------) X-Debbugs-Envelope-To: 9496 Cc: 9496@debbugs.gnu.org, bojohan@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.6 (------) > From: Kenichi Handa > Cc: bojohan@gnu.org, 9496@debbugs.gnu.org > Date: Wed, 14 Sep 2011 21:57:04 +0900 > > (compose-region START END &optional COMPONENTS MODIFICATION-FUNC) > > Compose characters in the current region. > [...] > Optional 3rd argument COMPONENTS, if non-nil, is a character, a string > or a vector or list of integers and rules. > [...] > If it is a string, the elements are alternate characters. In > this case, TAB element has a special meaning. If the first > character is TAB, the glyphs are displayed with left padding space > so that no pixel overlaps with the previous column. If the last > character is TAB, the glyphs are displayed with right padding > space so that no pixel overlaps with the following column. > ---------------------------------------------------------------------- > > This feature is typically used in describe-char to avoid a > single combining character overlapping with the surrounding > characters. Thanks. So what is the meaning of the example shown by Bojohan, i.e.: (insert (compose-string "\t")) What is expected from such a 'composition"? It sounds like the code in fill_composite_glyph_string is not prepared to deal with a situation where the string's only character is a TAB, is that right? From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 14 20:33:01 2011 Received: (at 9496) by debbugs.gnu.org; 15 Sep 2011 00:33:01 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3zsz-0005dO-2i for submit@debbugs.gnu.org; Wed, 14 Sep 2011 20:33:01 -0400 Received: from mx1.aist.go.jp ([150.29.246.133]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3zsv-0005dF-Lu for 9496@debbugs.gnu.org; Wed, 14 Sep 2011 20:33:00 -0400 Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id p8F0SJTd019658; Thu, 15 Sep 2011 09:28:19 +0900 (JST) env-from (handa@m17n.org) Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id p8F0SJNt016904; Thu, 15 Sep 2011 09:28:19 +0900 (JST) env-from (handa@m17n.org) Received: by smtp4.aist.go.jp with ESMTP id p8F0SHTK005662; Thu, 15 Sep 2011 09:28:17 +0900 (JST) env-from (handa@m17n.org) From: Kenichi Handa To: Eli Zaretskii Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition In-Reply-To: (message from Eli Zaretskii on Wed, 14 Sep 2011 09:07:48 -0400) Date: Thu, 15 Sep 2011 09:28:17 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 9496 Cc: 9496@debbugs.gnu.org, bojohan@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) In article , Eli Zaretskii writes: > So what is the meaning of the example shown by Bojohan, i.e.: > (insert (compose-string "\t")) > What is expected from such a 'composition"? I currently have no idea. It's just a wrong usage. > It sounds like the code in fill_composite_glyph_string is not prepared > to deal with a situation where the string's only character is a TAB, > is that right? Yes. --- Kenichi Handa handa@m17n.org From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 14 20:52:12 2011 Received: (at 9496) by debbugs.gnu.org; 15 Sep 2011 00:52:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R40BX-0006t0-N0 for submit@debbugs.gnu.org; Wed, 14 Sep 2011 20:52:11 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.181] helo=ironport2-out.pppoe.ca) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R40BV-0006st-SB for 9496@debbugs.gnu.org; Wed, 14 Sep 2011 20:52:10 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAGNKcU5FxK3+/2dsb2JhbABCp015gVMBAQQBViMQCzQSFBgNJIgKtU2GcQSgPYRE X-IronPort-AV: E=Sophos;i="4.68,384,1312171200"; d="scan'208";a="136453320" Received: from 69-196-173-254.dsl.teksavvy.com (HELO ceviche.home) ([69.196.173.254]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 14 Sep 2011 20:47:33 -0400 Received: by ceviche.home (Postfix, from userid 20848) id 91E4D660B6; Wed, 14 Sep 2011 20:47:32 -0400 (EDT) From: Stefan Monnier To: Kenichi Handa Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition Message-ID: References: <8739g0tcp5.fsf@gnu.org> Date: Wed, 14 Sep 2011 20:47:32 -0400 In-Reply-To: (Kenichi Handa's message of "Thu, 15 Sep 2011 09:28:17 +0900") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.1 (--) X-Debbugs-Envelope-To: 9496 Cc: Eli Zaretskii , 9496@debbugs.gnu.org, bojohan@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.1 (--) >> So what is the meaning of the example shown by Bojohan, i.e.: >> (insert (compose-string "\t")) >> What is expected from such a 'composition"? > I currently have no idea. It's just a wrong usage. I think it would be logical to handle this (as well as "\t\t") in the same way as the empty string (after all "\t" is a "" with a \t prepended or appended). Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 15 00:15:21 2011 Received: (at 9496) by debbugs.gnu.org; 15 Sep 2011 04:15:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R43M6-00057R-FK for submit@debbugs.gnu.org; Thu, 15 Sep 2011 00:15:21 -0400 Received: from mx1.aist.go.jp ([150.29.246.133]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R43M1-0004zQ-Dc for 9496@debbugs.gnu.org; Thu, 15 Sep 2011 00:15:16 -0400 Received: from rqsmtp1.aist.go.jp (rqsmtp1.aist.go.jp [150.29.254.115]) by mx1.aist.go.jp with ESMTP id p8F4AXQ2020838; Thu, 15 Sep 2011 13:10:33 +0900 (JST) env-from (handa@m17n.org) Received: from smtp3.aist.go.jp by rqsmtp1.aist.go.jp with ESMTP id p8F4AXxd020697; Thu, 15 Sep 2011 13:10:33 +0900 (JST) env-from (handa@m17n.org) Received: by smtp3.aist.go.jp with ESMTP id p8F4AV2X022775; Thu, 15 Sep 2011 13:10:32 +0900 (JST) env-from (handa@m17n.org) From: Kenichi Handa To: Stefan Monnier Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition In-Reply-To: (message from Stefan Monnier on Wed, 14 Sep 2011 20:47:32 -0400) Date: Thu, 15 Sep 2011 13:10:31 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 9496 Cc: eliz@gnu.org, 9496@debbugs.gnu.org, bojohan@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) In article , Stefan Monnier writes: >>> So what is the meaning of the example shown by Bojohan, i.e.: >>> (insert (compose-string "\t")) >>> What is expected from such a 'composition"? > > I currently have no idea. It's just a wrong usage. > I think it would be logical to handle this (as well as "\t\t") in the > same way as the empty string (after all "\t" is a "" with a \t > prepended or appended). That is one way. But I'm not sure that the current code handles the composition component of empty string correctly. :-( Another way is to treat it as the same way as "\t" display property. Composition component of one character string is the same as display property of that one character string. For instance, the following two has the same visual effect: (put-text-property 1 2 'display "a") (compose-region 1 2 "a") --- Kenichi Handa handa@m17n.org From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 17 12:38:43 2011 Received: (at control) by debbugs.gnu.org; 17 Oct 2011 16:38:43 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFqD5-0005Mv-9B for submit@debbugs.gnu.org; Mon, 17 Oct 2011 12:38:43 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RFqD3-0005Mn-0U for control@debbugs.gnu.org; Mon, 17 Oct 2011 12:38:41 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RFqCC-0007Iz-4F for control@debbugs.gnu.org; Mon, 17 Oct 2011 12:37:48 -0400 Date: Mon, 17 Oct 2011 12:37:48 -0400 Message-Id: Subject: control message for bug 9775 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -6.4 (------) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.4 (------) merge 9496 9775 From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 11 02:16:03 2011 Received: (at 9496) by debbugs.gnu.org; 11 Nov 2011 07:16:03 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROlLG-00021a-6d for submit@debbugs.gnu.org; Fri, 11 Nov 2011 02:16:03 -0500 Received: from mx1.aist.go.jp ([150.29.246.133]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ROlLA-000217-UX for 9496@debbugs.gnu.org; Fri, 11 Nov 2011 02:15:59 -0500 Received: from rqsmtp2.aist.go.jp (rqsmtp2.aist.go.jp [150.29.254.123]) by mx1.aist.go.jp with ESMTP id pAB7Fd4b005060; Fri, 11 Nov 2011 16:15:39 +0900 (JST) env-from (handa@m17n.org) Received: from smtp4.aist.go.jp by rqsmtp2.aist.go.jp with ESMTP id pAB7Fca6023265; Fri, 11 Nov 2011 16:15:38 +0900 (JST) env-from (handa@m17n.org) Received: by smtp4.aist.go.jp with ESMTP id pAB7FcjJ004295; Fri, 11 Nov 2011 16:15:38 +0900 (JST) env-from (handa@m17n.org) From: Kenichi Handa To: Johan =?iso-8859-1?Q?Bockg=E5rd?= Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition In-Reply-To: <8739g0tcp5.fsf@gnu.org> (message from Johan =?iso-8859-1?Q?B?= =?iso-8859-1?Q?ockg=E5rd?= on Tue, 13 Sep 2011 22:22:14 +0200) Date: Fri, 11 Nov 2011 16:15:38 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.8 (--) X-Debbugs-Envelope-To: 9496 Cc: 9496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.8 (--) In article <8739g0tcp5.fsf@gnu.org>, Johan Bockg=E5rd wri= tes: > (insert (compose-string "\t")) > Program received signal SIGSEGV, Segmentation fault. > 0x00000000004d45d4 in x_set_glyph_string_gc (s=3D0x7fffffffae80) at xterm= .c:1061 > 1061 PREPARE_FACE_FOR_DISPLAY (s->f, s->face); > (gdb) bt > #0 0x00000000004d45d4 in x_set_glyph_string_gc (s=3D0x7fffffffae80) > at xterm.c:1061 > #1 x_draw_glyph_string (s=3D0x7fffffffae80) at xterm.c:2683 > This problem is not new, but due to other changes it now makes > `describe-char' (C-u C-x =3D) crash when executed on a tab character. > 2011-09-13 Johan Bockg=E5rd > * xdisp.c (fill_composite_glyph_string): Always set s->face, to > avoid a crash. Thank you. Although we have not yet decided what is the right displaying of such a composition, I've just installed your fix at least to avoid crash. --- Kenichi Handa handa@m17n.org From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 07 01:20:43 2012 Received: (at control) by debbugs.gnu.org; 7 Jan 2012 06:20:43 +0000 Received: from localhost ([127.0.0.1]:47593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjPdy-0008D1-GR for submit@debbugs.gnu.org; Sat, 07 Jan 2012 01:20:42 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:34344 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RjPdw-0008Ct-JH for control@debbugs.gnu.org; Sat, 07 Jan 2012 01:20:41 -0500 Received: from bb220-255-176-96.singnet.com.sg ([220.255.176.96]:47540 helo=furball) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1RjPdu-0003bZ-5W for control@debbugs.gnu.org; Sat, 07 Jan 2012 01:20:39 -0500 From: Chong Yidong To: control@debbugs.gnu.org Subject: close 9496 Date: Sat, 07 Jan 2012 14:20:32 +0800 Message-ID: <87y5tkc9u7.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) close 9496 thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 14:29:18 2012 Received: (at 9496) by debbugs.gnu.org; 3 Feb 2012 19:29:19 +0000 Received: from localhost ([127.0.0.1]:52691 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtOow-0001UW-4j for submit@debbugs.gnu.org; Fri, 03 Feb 2012 14:29:18 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:55287) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtOot-0001Ty-AR for 9496@debbugs.gnu.org; Fri, 03 Feb 2012 14:29:16 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 44B1339E8007 for <9496@debbugs.gnu.org>; Fri, 3 Feb 2012 11:28:35 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F62jNcw16UGJ for <9496@debbugs.gnu.org>; Fri, 3 Feb 2012 11:28:34 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id C7187A60002 for <9496@debbugs.gnu.org>; Fri, 3 Feb 2012 11:28:34 -0800 (PST) Message-ID: <4F2C355D.6020302@cs.ucla.edu> Date: Fri, 03 Feb 2012 11:28:29 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: 9496@debbugs.gnu.org Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 9496 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) When a fix for this was merged into the trunk I noticed a problem from the trunk's point of view: the fix introduced the possibility of an unchecked integer overflow which would cause character widths to go negative and could cause real problems later. I installed this further fix to the trunk: Handle overflow when computing char display width (Bug#9496). * character.c (char_width): Return EMACS_INT, not int. (char_width, c_string_width): Check for overflow when computing the width; this is possible now that individual characters can have unbounded width. Problem introduced by merge from Emacs 23 on 2012-01-19. === modified file 'src/character.c' --- src/character.c 2012-01-19 07:21:25 +0000 +++ src/character.c 2012-02-03 19:19:42 +0000 @@ -311,10 +311,10 @@ /* Return width (columns) of C considering the buffer display table DP. */ -static int +static EMACS_INT char_width (int c, struct Lisp_Char_Table *dp) { - int width = CHAR_WIDTH (c); + EMACS_INT width = CHAR_WIDTH (c); if (dp) { @@ -326,7 +326,12 @@ { ch = AREF (disp, i); if (CHARACTERP (ch)) - width += CHAR_WIDTH (XFASTINT (ch)); + { + int w = CHAR_WIDTH (XFASTINT (ch)); + if (INT_ADD_OVERFLOW (width, w)) + string_overflow (); + width += w; + } } } return width; @@ -340,7 +345,8 @@ usage: (char-width CHAR) */) (Lisp_Object ch) { - int c, width; + int c; + EMACS_INT width; CHECK_CHARACTER (ch); c = XINT (ch); @@ -367,10 +373,14 @@ { int bytes; int c = STRING_CHAR_AND_LENGTH (str + i_byte, bytes); - int thiswidth = char_width (c, dp); + EMACS_INT thiswidth = char_width (c, dp); - if (precision > 0 - && (width + thiswidth > precision)) + if (precision <= 0) + { + if (INT_ADD_OVERFLOW (width, thiswidth)) + string_overflow (); + } + else if (precision - width < thiswidth) { *nchars = i; *nbytes = i_byte; From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 16:23:19 2012 Received: (at 9496) by debbugs.gnu.org; 3 Feb 2012 21:23:19 +0000 Received: from localhost ([127.0.0.1]:52770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtQbG-0004LW-SH for submit@debbugs.gnu.org; Fri, 03 Feb 2012 16:23:19 -0500 Received: from mtaout22.012.net.il ([80.179.55.172]:59416) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtQbE-0004LB-Na for 9496@debbugs.gnu.org; Fri, 03 Feb 2012 16:23:17 -0500 Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0LYU001005ZRRG00@a-mtaout22.012.net.il> for 9496@debbugs.gnu.org; Fri, 03 Feb 2012 23:22:35 +0200 (IST) Received: from HOME-C4E4A596F7 ([84.229.198.178]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LYU001LZ61ML240@a-mtaout22.012.net.il>; Fri, 03 Feb 2012 23:22:35 +0200 (IST) Date: Fri, 03 Feb 2012 23:22:34 +0200 From: Eli Zaretskii Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition In-reply-to: <4F2C355D.6020302@cs.ucla.edu> X-012-Sender: halo1@inter.net.il To: Paul Eggert Message-id: <83ipjnehnp.fsf@gnu.org> References: <8739g0tcp5.fsf@gnu.org> <4F2C355D.6020302@cs.ucla.edu> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 9496 Cc: 9496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Fri, 03 Feb 2012 11:28:29 -0800 > From: Paul Eggert > > -static int > +static EMACS_INT > char_width (int c, struct Lisp_Char_Table *dp) > { > - int width = CHAR_WIDTH (c); > + EMACS_INT width = CHAR_WIDTH (c); Oh, come on! CHAR_WIDTH returns the character's width _on_the_screen_. So how in the world could it _ever_ overflow a 32-bit integer?? From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 17:08:34 2012 Received: (at 9496) by debbugs.gnu.org; 3 Feb 2012 22:08:34 +0000 Received: from localhost ([127.0.0.1]:52838 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtRJ3-0005ST-R7 for submit@debbugs.gnu.org; Fri, 03 Feb 2012 17:08:34 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:34270) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtRJ0-0005SF-As for 9496@debbugs.gnu.org; Fri, 03 Feb 2012 17:08:31 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id C956C39E8011; Fri, 3 Feb 2012 14:07:49 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id k6FTevFwrh+r; Fri, 3 Feb 2012 14:07:49 -0800 (PST) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 2697239E8010; Fri, 3 Feb 2012 14:07:49 -0800 (PST) Message-ID: <4F2C5AB4.3080500@cs.ucla.edu> Date: Fri, 03 Feb 2012 14:07:48 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition References: <8739g0tcp5.fsf@gnu.org> <4F2C355D.6020302@cs.ucla.edu> <83ipjnehnp.fsf@gnu.org> In-Reply-To: <83ipjnehnp.fsf@gnu.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 9496 Cc: 9496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 02/03/2012 01:22 PM, Eli Zaretskii wrote: > how in the world could it _ever_ overflow a > 32-bit integer?? (setq tab-width 1000) (standard-display-ascii 256 (make-string 2147484 ?\t)) This causes (char-width 256) to return 2147484000, now that the patch has been installed. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 04 01:59:41 2012 Received: (at 9496) by debbugs.gnu.org; 4 Feb 2012 06:59:41 +0000 Received: from localhost ([127.0.0.1]:53035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtZb3-0003wZ-0K for submit@debbugs.gnu.org; Sat, 04 Feb 2012 01:59:41 -0500 Received: from mtaout21.012.net.il ([80.179.55.169]:45130) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtZax-0003wI-2O for 9496@debbugs.gnu.org; Sat, 04 Feb 2012 01:59:39 -0500 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LYU00500W2JAR00@a-mtaout21.012.net.il> for 9496@debbugs.gnu.org; Sat, 04 Feb 2012 08:58:51 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.139.211]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LYU005Q0WQ27C60@a-mtaout21.012.net.il>; Sat, 04 Feb 2012 08:58:50 +0200 (IST) Date: Sat, 04 Feb 2012 08:58:50 +0200 From: Eli Zaretskii Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition In-reply-to: <4F2C5AB4.3080500@cs.ucla.edu> X-012-Sender: halo1@inter.net.il To: Paul Eggert Message-id: <83haz7dqz9.fsf@gnu.org> References: <8739g0tcp5.fsf@gnu.org> <4F2C355D.6020302@cs.ucla.edu> <83ipjnehnp.fsf@gnu.org> <4F2C5AB4.3080500@cs.ucla.edu> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 9496 Cc: 9496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Fri, 03 Feb 2012 14:07:48 -0800 > From: Paul Eggert > CC: 9496@debbugs.gnu.org > > On 02/03/2012 01:22 PM, Eli Zaretskii wrote: > > how in the world could it _ever_ overflow a > > 32-bit integer?? > > (setq tab-width 1000) > (standard-display-ascii 256 (make-string 2147484 ?\t)) Then don't do that. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 04 02:19:40 2012 Received: (at 9496) by debbugs.gnu.org; 4 Feb 2012 07:19:40 +0000 Received: from localhost ([127.0.0.1]:53042 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtZuN-0005E0-K4 for submit@debbugs.gnu.org; Sat, 04 Feb 2012 02:19:39 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:59914) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtZuK-0005Cz-SO for 9496@debbugs.gnu.org; Sat, 04 Feb 2012 02:19:38 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id F3917A60002 for <9496@debbugs.gnu.org>; Fri, 3 Feb 2012 23:18:53 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nm2KC8NelO0T for <9496@debbugs.gnu.org>; Fri, 3 Feb 2012 23:18:53 -0800 (PST) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id A4CC739E8007 for <9496@debbugs.gnu.org>; Fri, 3 Feb 2012 23:18:53 -0800 (PST) Message-ID: <4F2CDBDA.6080307@cs.ucla.edu> Date: Fri, 03 Feb 2012 23:18:50 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111229 Thunderbird/9.0 MIME-Version: 1.0 To: 9496@debbugs.gnu.org Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition References: <8739g0tcp5.fsf@gnu.org> <4F2C355D.6020302@cs.ucla.edu> <83ipjnehnp.fsf@gnu.org> <4F2C5AB4.3080500@cs.ucla.edu> <83haz7dqz9.fsf@gnu.org> In-Reply-To: <83haz7dqz9.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 9496 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 02/03/2012 10:58 PM, Eli Zaretskii wrote: > Then don't do that. I don't see why not. GNU code is supposed to avoid arbitrary limits on the length or number of any data structure. A 64-bit Emacs should not arbitrarily impose a 32-bit limit here. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 04 03:15:22 2012 Received: (at 9496) by debbugs.gnu.org; 4 Feb 2012 08:15:22 +0000 Received: from localhost ([127.0.0.1]:53056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtamI-00079V-Iz for submit@debbugs.gnu.org; Sat, 04 Feb 2012 03:15:22 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:37083) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtamE-00079F-ID for 9496@debbugs.gnu.org; Sat, 04 Feb 2012 03:15:20 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LYV00F0005QD500@a-mtaout20.012.net.il> for 9496@debbugs.gnu.org; Sat, 04 Feb 2012 10:14:34 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.126.149.90]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LYV00FNE0897960@a-mtaout20.012.net.il>; Sat, 04 Feb 2012 10:14:34 +0200 (IST) Date: Sat, 04 Feb 2012 10:14:34 +0200 From: Eli Zaretskii Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition In-reply-to: <4F2CDBDA.6080307@cs.ucla.edu> X-012-Sender: halo1@inter.net.il To: Paul Eggert Message-id: <83bopfdnh1.fsf@gnu.org> References: <8739g0tcp5.fsf@gnu.org> <4F2C355D.6020302@cs.ucla.edu> <83ipjnehnp.fsf@gnu.org> <4F2C5AB4.3080500@cs.ucla.edu> <83haz7dqz9.fsf@gnu.org> <4F2CDBDA.6080307@cs.ucla.edu> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 9496 Cc: 9496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Fri, 03 Feb 2012 23:18:50 -0800 > From: Paul Eggert > > On 02/03/2012 10:58 PM, Eli Zaretskii wrote: > > Then don't do that. > > I don't see why not. Because the result is meaningless anyway. Being able to "express" a 2G column wide "character" is not useful, so avoiding overflow for that use case is not really a solution to the problem. It would be a much better solution if char_width would limit the result to the same sane limit we have in all the related functions and macros, i.e. to 1000. If you limit everything in that function to 1000, including its result, there's no danger of overflow anywhere, and the resulting display is not too preposterous. From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 04 18:44:51 2012 Received: (at 9496) by debbugs.gnu.org; 4 Feb 2012 23:44:51 +0000 Received: from localhost ([127.0.0.1]:54747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtpHm-0007L0-Tz for submit@debbugs.gnu.org; Sat, 04 Feb 2012 18:44:51 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:57928) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtpHk-0007Kn-1I for 9496@debbugs.gnu.org; Sat, 04 Feb 2012 18:44:49 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 361D7A60004; Sat, 4 Feb 2012 15:44:01 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dTDDEOejoG61; Sat, 4 Feb 2012 15:44:00 -0800 (PST) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 88D81A60002; Sat, 4 Feb 2012 15:44:00 -0800 (PST) Message-ID: <4F2DC2BC.9080202@cs.ucla.edu> Date: Sat, 04 Feb 2012 15:43:56 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111229 Thunderbird/9.0 MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition References: <8739g0tcp5.fsf@gnu.org> <4F2C355D.6020302@cs.ucla.edu> <83ipjnehnp.fsf@gnu.org> <4F2C5AB4.3080500@cs.ucla.edu> <83haz7dqz9.fsf@gnu.org> <4F2CDBDA.6080307@cs.ucla.edu> <83bopfdnh1.fsf@gnu.org> In-Reply-To: <83bopfdnh1.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 9496 Cc: 9496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 02/04/2012 12:14 AM, Eli Zaretskii wrote: > It would be a much better solution if char_width would limit the > result to the same sane limit we have in all the related functions and > macros, i.e. to 1000. OK, that's doable, but if done in isolation it would introduce other bugs, no? If char-width returns a value that's arbitrarily ceilinged at 1000, but actual characters can be wider than 1000 columns, code that uses char-width to count columns will be buggy. We could address this by changing the code that renders characters, so that the code limits them to at most 1000 columns on the display. That's what's done with tabs, so there's good precedent for it. This would require changes to the rendering code so that it matches the altered char-width that's ceilinged at 1000. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 05 11:37:23 2012 Received: (at 9496) by debbugs.gnu.org; 5 Feb 2012 16:37:23 +0000 Received: from localhost ([127.0.0.1]:55735 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ru55f-0001he-FL for submit@debbugs.gnu.org; Sun, 05 Feb 2012 11:37:23 -0500 Received: from mtaout20.012.net.il ([80.179.55.166]:49654) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ru55c-0001hQ-Bv for 9496@debbugs.gnu.org; Sun, 05 Feb 2012 11:37:21 -0500 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LYX00E00HZDR800@a-mtaout20.012.net.il> for 9496@debbugs.gnu.org; Sun, 05 Feb 2012 18:36:28 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.33.58]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LYX00CG3I4SF1E0@a-mtaout20.012.net.il>; Sun, 05 Feb 2012 18:36:28 +0200 (IST) Date: Sun, 05 Feb 2012 18:36:30 +0200 From: Eli Zaretskii Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition In-reply-to: <4F2DC2BC.9080202@cs.ucla.edu> X-012-Sender: halo1@inter.net.il To: Paul Eggert Message-id: <83haz5ck4x.fsf@gnu.org> References: <8739g0tcp5.fsf@gnu.org> <4F2C355D.6020302@cs.ucla.edu> <83ipjnehnp.fsf@gnu.org> <4F2C5AB4.3080500@cs.ucla.edu> <83haz7dqz9.fsf@gnu.org> <4F2CDBDA.6080307@cs.ucla.edu> <83bopfdnh1.fsf@gnu.org> <4F2DC2BC.9080202@cs.ucla.edu> X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 9496 Cc: 9496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) > Date: Sat, 04 Feb 2012 15:43:56 -0800 > From: Paul Eggert > CC: 9496@debbugs.gnu.org > > On 02/04/2012 12:14 AM, Eli Zaretskii wrote: > > It would be a much better solution if char_width would limit the > > result to the same sane limit we have in all the related functions and > > macros, i.e. to 1000. > > OK, that's doable, but if done in isolation it would introduce other > bugs, no? If char-width returns a value that's arbitrarily ceilinged > at 1000, but actual characters can be wider than 1000 columns, > code that uses char-width to count columns will be buggy. How can an actual character (not its display-table replacement) be wider than that? > We could address this by changing the code that renders characters, > so that the code limits them to at most 1000 columns on the display. That was my intent, yes. From debbugs-submit-bounces@debbugs.gnu.org Sun Feb 05 11:40:48 2012 Received: (at 9496) by debbugs.gnu.org; 5 Feb 2012 16:40:48 +0000 Received: from localhost ([127.0.0.1]:55739 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ru58x-0001mC-3V for submit@debbugs.gnu.org; Sun, 05 Feb 2012 11:40:48 -0500 Received: from smtp.cs.ucla.edu ([131.179.128.62]:51671) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Ru58s-0001lx-BT for 9496@debbugs.gnu.org; Sun, 05 Feb 2012 11:40:44 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 55E6BA60002; Sun, 5 Feb 2012 08:39:51 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d-+YJFY33K1L; Sun, 5 Feb 2012 08:39:51 -0800 (PST) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id F1E3539E8007; Sun, 5 Feb 2012 08:39:50 -0800 (PST) Message-ID: <4F2EB0D1.5040704@cs.ucla.edu> Date: Sun, 05 Feb 2012 08:39:45 -0800 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux i686; rv:9.0) Gecko/20111229 Thunderbird/9.0 MIME-Version: 1.0 To: Eli Zaretskii Subject: Re: bug#9496: 24.0.50; Segfault on TAB-only composition References: <8739g0tcp5.fsf@gnu.org> <4F2C355D.6020302@cs.ucla.edu> <83ipjnehnp.fsf@gnu.org> <4F2C5AB4.3080500@cs.ucla.edu> <83haz7dqz9.fsf@gnu.org> <4F2CDBDA.6080307@cs.ucla.edu> <83bopfdnh1.fsf@gnu.org> <4F2DC2BC.9080202@cs.ucla.edu> <83haz5ck4x.fsf@gnu.org> In-Reply-To: <83haz5ck4x.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 9496 Cc: 9496@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 02/05/2012 08:36 AM, Eli Zaretskii wrote: >> If char-width returns a value that's arbitrarily ceilinged >> at 1000, but actual characters can be wider than 1000 columns, >> code that uses char-width to count columns will be buggy. > > How can an actual character (not its display-table replacement) be > wider than that? By "actual character" I meant to include how the character is displayed, since char-width measures display width. So that includes the display-table replacement if any. >> We could address this by changing the code that renders characters, >> so that the code limits them to at most 1000 columns on the display. > > That was my intent, yes. OK, that sounds reasonable. From unknown Tue Aug 19 05:09:37 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 05 Mar 2012 12:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator