From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Yates Newsgroups: gmane.emacs.bugs Subject: bug#10793: 24.0.93; yet another macro lock up Date: Sat, 11 Feb 2012 14:56:42 -0500 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1328990270 3812 80.91.229.3 (11 Feb 2012 19:57:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 11 Feb 2012 19:57:50 +0000 (UTC) Cc: Alan Mackenzie To: 10793@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Feb 11 20:57:49 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RwJ4t-0004XH-8L for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Feb 2012 20:57:47 +0100 Original-Received: from localhost ([::1]:51664 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwJ4s-0005d3-Ta for geb-bug-gnu-emacs@m.gmane.org; Sat, 11 Feb 2012 14:57:46 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:45132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwJ4p-0005cy-GH for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2012 14:57:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwJ4o-0006QK-4m for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2012 14:57:43 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:32817) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwJ4o-0006QG-18 for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2012 14:57:42 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RwJ66-000768-7o for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2012 14:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: John Yates Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Feb 2012 19:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10793 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.132899029827221 (code B ref -1); Sat, 11 Feb 2012 19:59:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Feb 2012 19:58:18 +0000 Original-Received: from localhost ([127.0.0.1]:36440 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RwJ5N-000750-34 for submit@debbugs.gnu.org; Sat, 11 Feb 2012 14:58:17 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:56300) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RwJ5J-00074m-ME for submit@debbugs.gnu.org; Sat, 11 Feb 2012 14:58:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwJ3u-0006M0-OM for submit@debbugs.gnu.org; Sat, 11 Feb 2012 14:56:48 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:56490) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwJ3u-0006Lw-Mi for submit@debbugs.gnu.org; Sat, 11 Feb 2012 14:56:46 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:44975) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwJ3t-0005Qq-AA for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2012 14:56:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RwJ3r-0006Lg-Bo for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2012 14:56:45 -0500 Original-Received: from mail-iy0-f169.google.com ([209.85.210.169]:50851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RwJ3r-0006La-5M for bug-gnu-emacs@gnu.org; Sat, 11 Feb 2012 14:56:43 -0500 Original-Received: by iagz16 with SMTP id z16so2494122iag.0 for ; Sat, 11 Feb 2012 11:56:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=7tjuixgn6SSPaxcxgAgW3jScuU5yFB3mbjlPsaow6kk=; b=L4vp6DvrDx2Fj3fOa4iwQglKlT/IG32CV0jJi3n83lIuvtcFEbZoKI8ChXGDk2eboi 1Db3uP53Dq212vGHBmA9IO7kc4I5j7QdjG38zdXla6bpn8VFl4qWZej6rIRHCMdV7tI8 6ATcFW3Xn1Z4AxQpVFYXwKzFLTWW2XdvQ3s6s= Original-Received: by 10.42.174.71 with SMTP id u7mr14094634icz.44.1328990202378; Sat, 11 Feb 2012 11:56:42 -0800 (PST) Original-Received: by 10.231.108.74 with HTTP; Sat, 11 Feb 2012 11:56:42 -0800 (PST) X-Google-Sender-Auth: D5C1Mt6hQQ6r0c95ULz3lH-OwPk 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56805 Archived-At: This bug report will be sent to the Bug-GNU-Emacs mailing list and the GNU bug tracker at debbugs.gnu.org. =A0Please check that the From: line contains a valid email address. =A0After a delay of up to one day, you should receive an acknowledgement at that address. Please write in English if possible, as the Emacs maintainers usually do not have translators for other languages. Please describe exactly what actions triggered the bug, and the precise symptoms of the bug. =A0If you can, give a recipe starting from `emacs -Q': Attempting to open the following .cpp never renders even the first line. ------------------------------------------------------ #define NEXT_NCHAR(LIMIT,LENGTH_ACCUMULATOR,CONTEXT,TRAIL)\ do {\ enum {\ mYes, mNo, mSPrime\ } MaybeEncountered =3D mNo;\ uint8 CurWeight =3D NO_WEIGHT;\ bool firstPass =3D TRUE;\ unsigned int Utf32GraphemeStack[MAX_GRAPHEME_COUNT];\ unsigned int* pUtf32GraphemeEnd =3D Utf32GraphemeStack;\ pUtf8GraphemeStart =3D pText - 1;\ while (TRUE) { /* Loop exits at the end of a grapheme after stable character found */\ unsigned int codePoint =3D ch;\ unsigned int charByteSize =3D 1;\ uint8 Props =3D PROPS_STABLE;\ pUtf8GraphemeEnd =3D pText - 1;\ /* The stopper need not be valid UTF8. Cannot use IF_STOPPER_GOTO */\ /* because it advances pText for a double quote. (SWS42635) Only need check for */\ /* the delimiter here. */\ if (ch =3D=3D REG_valueDelim) goto STOPPER_##CONTEXT;\ if ((ch & 0x80) !=3D 0) /* Decode multiple UTF8 bytes into a codepoint */\ {\ unsigned int ContByteLo =3D 0x80;\ unsigned int ContByteHi =3D 0xBF;\ unsigned int nContBytes =3D 1;\ charByteSize =3D 2;\ codePoint &=3D 0x1F;\ if (ch <=3D 0xC1)\ goto UTF8_ILLEGAL_INITIAL_BYTE;\ if (ch <=3D 0xDF)\ goto DECODE_CONTINUATION_BYTES_##CONTEXT;\ nContBytes =3D 2;\ charByteSize =3D 3;\ codePoint &=3D 0xF;\ if (ch =3D=3D 0xE0) {\ ContByteLo =3D 0xA0;\ goto DECODE_CONTINUATION_BYTES_##CONTEXT;\ }\ if (ch =3D=3D 0xED) {\ ContByteHi =3D 0x9F;\ goto DECODE_CONTINUATION_BYTES_##CONTEXT;\ }\ if (ch <=3D 0xEF)\ goto DECODE_CONTINUATION_BYTES_##CONTEXT;\ nContBytes =3D 3;\ charByteSize =3D 4;\ if (ch =3D=3D 0xF0) {\ ContByteLo =3D 0x90;\ goto DECODE_CONTINUATION_BYTES_##CONTEXT;\ }\ if (ch < 0xF4)\ goto DECODE_CONTINUATION_BYTES_##CONTEXT;\ if (ch =3D=3D 0xF4) {\ ContByteHi =3D 0x8F;\ goto DECODE_CONTINUATION_BYTES_##CONTEXT;\ }\ goto UTF8_ILLEGAL_INITIAL_BYTE;\ do {\ ContByteLo =3D 0x80;\ ContByteHi =3D 0xBF;\ DECODE_CONTINUATION_BYTES_##CONTEXT= :\ TRAIL ;/* SWS 41355 */\ ch =3D *pText++;\ codePoint <<=3D 6;\ if (ch < ContByteLo || ch > ContByt= eHi)\ goto UTF8_BAD_CONTINUATION_BYTE= ;\ codePoint |=3D (ch & 0x3F);\ }\ while (--nContBytes);\ CHECK_UNICODE_PROPS; \ } /* End of the non 7 bit ASCII clause*/\ STOPPER_##CONTEXT:\ if ((pUtf32GraphemeEnd - Utf32GraphemeStack) >=3D MAX_GRAPHEME_COUNT) {\ goto EXCEED;\ }\ *pUtf32GraphemeEnd++ =3D codePoint;\ if ((Props & 0x80) =3D=3D 0x80 ||\ (firstPass) ||\ !declExtra) { /* Stable or Stable' or the first character in the grapheme or filled the record */\ /* If we are at stable character, but have encountered a previous Maybe then */\ /* let the ICU routine decide. If here on firstPass then MaybeEncountered will be No */\ if ((MaybeEncountered =3D=3D mYes) &&\ !is_NFC(Utf32GraphemeStack, pUtf32GraphemeEnd - 1)) {\ goto BAD_SEQUENCE;\ }\ if (firstPass) { /* Continue if this is the first stable char in the grapheme */\ firstPass =3D FALSE;\ } else {\ /* This stable character is processed twice. Once to mark the end of the previous grapheme */\ /* and then at the start of the next. At some point we may want to eliminate this if it demonstrates */\ /* a real performance loss. No need to check for the stopper or record size here because we decrease pText*/\ IF_STOPPER_GOTO(REG_valueDelim,LIMIT,G_FINISH_##CONTEXT);\ if (!declExtra) goto FINISH_##CONTE= XT;\ pText=3DpUtf8GraphemeEnd;/* Ended the grapheme and it is NFC */\ NEXT_CHAR(LIMIT);\ break;/* out of the while(true) loo= p */\ }\ if ((Props & 0xC0) =3D=3D 0xC0) { /* Stable' */\ MaybeEncountered =3D mSPrime; /* Never count any Maybe in this grapheme */\ }\ }/* End of Stable Props (Grapheme end) or first pass */\ if ((MaybeEncountered !=3D mSPrime) && \ (Props & 0xC0) =3D=3D 0x40) {\ MaybeEncountered =3D mYes;\ }\ Props &=3D 0x3F;\ if ((Props < CurWeight) && Props !=3DBASE_WEIGHT) {\ badUnicodeCodePoint =3D codePoint;\ goto DIAGNOSE_BAD_WEIGHT;\ }\ CurWeight =3D Props;\ LENGTH_ACCUMULATOR+=3DcharByteSize;\ NEXT_CHAR(LIMIT);\ declExtra--; /* Exit on zero after seeing if the final grapheme is NFC' */\ }/*End of While(TRUE) break out of here at the end of a grapheme*/\ /*LENGTH_ACCUMULATOR +=3D pUtf8GraphemeEnd - pUtf8GraphemeStart;*/\ pUtf8GraphemeStart =3D pUtf8GraphemeEnd;\ } while (FALSE); /*In a do while false structure just for the macro semantics*/ ------------------------------------------------------ If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: =A0 =A0 `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file /usr/share/emacs/24.0.93/etc/DEBUG. In GNU Emacs 24.0.93.1 (x86_64-pc-linux-gnu, GTK+ Version 3.2.3) =A0of 2012-02-08 on zelenka, modified by Debian =A0(emacs-snapshot package, version 2:20120208-1) Windowing system distributor `The X.Org Foundation', version 11.0.11001000 Configured using: =A0`configure '--build' 'x86_64-linux-gnu' '--host' 'x86_64-linux-gnu' =A0'--prefix=3D/usr' '--sharedstatedir=3D/var/lib' '--libexecdir=3D/usr/lib= ' =A0'--localstatedir=3D/var' '--infodir=3D/usr/share/info' =A0'--mandir=3D/usr/share/man' '--with-pop=3Dyes' =A0'--enable-locallisppath=3D/etc/emacs-snapshot:/etc/emacs:/usr/local/shar= e/emacs/24.0.93/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs= /24.0.93/site-lisp:/usr/share/emacs/site-lisp' =A0'--without-compress-info' '--with-crt-dir=3D/usr/lib/x86_64-linux-gnu/' =A0'--with-x=3Dyes' '--with-x-toolkit=3Dgtk3' '--with-imagemagick=3Dyes' =A0'build_alias=3Dx86_64-linux-gnu' 'host_alias=3Dx86_64-linux-gnu' =A0'CFLAGS=3D-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=3D5000 -g -O2'' Important settings: =A0 value of $LC_ALL: nil =A0 value of $LC_COLLATE: nil =A0 value of $LC_CTYPE: nil =A0 value of $LC_MESSAGES: nil =A0 value of $LC_MONETARY: nil =A0 value of $LC_NUMERIC: nil =A0 value of $LC_TIME: nil =A0 value of $LANG: en_US.UTF-8 =A0 value of $XMODIFIERS: nil =A0 locale-coding-system: utf-8-unix =A0 default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: =A0 tooltip-mode: t =A0 mouse-wheel-mode: t =A0 tool-bar-mode: t =A0 menu-bar-mode: t =A0 file-name-shadow-mode: t =A0 global-font-lock-mode: t =A0 font-lock-mode: t =A0 blink-cursor-mode: t =A0 auto-composition-mode: t =A0 auto-encryption-mode: t =A0 auto-compression-mode: t =A0 line-number-mode: t =A0 transient-mark-mode: t Recent input: x r e p o r t - Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: /usr/share/emacs/24.0.93/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup Features: (shadow sort gnus-util mail-extr message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader emacsbug time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)