Subject: bug#17898: 24.4.50; bootstrap crash on latest Emacs trunk, r117465

From: Dmitry Antipov <[email-masked]>
Date: Wed, 02 Jul 2014 17:41:18 +0400

On 07/02/2014 04:59 PM, Nix wrote:

> I see this during current trunk bootstrap (with the configure options
> below, since the Emacs I'm using to report this bug was built with the
> same script):

Although I can't reproduce it, there is an obvious think I forgot to change
with r117464 :-( - please try this.

Dmitry

=== modified file 'src/print.c'
--- src/print.c	2014-07-02 03:26:19 +0000
+++ src/print.c	2014-07-02 13:38:07 +0000
@@ -1981,16 +1981,24 @@
 
 	  PRINTCHAR ('[');
 	  {
-	    register int i;
+	    int i, idx = SUB_CHAR_TABLE_P (obj) ? SUB_CHAR_TABLE_OFFSET : 0;
 	    register Lisp_Object tem;
 	    ptrdiff_t real_size = size;
 
+	    /* For a sub char-table, print heading non-Lisp data first.  */
+	    if (SUB_CHAR_TABLE_P (obj))
+	      {
+		i = sprintf (buf, "%d %d", XSUB_CHAR_TABLE (obj)->depth,
+			     XSUB_CHAR_TABLE (obj)->min_char);
+		strout (buf, i, i, printcharfun);
+	      }
+
 	    /* Don't print more elements than the specified maximum.  */
 	    if (NATNUMP (Vprint_length)
 		&& XFASTINT (Vprint_length) < size)
 	      size = XFASTINT (Vprint_length);
 
-	    for (i = 0; i < size; i++)
+	    for (i = idx; i < size; i++)
 	      {
 		if (i) PRINTCHAR (' ');
 		tem = AREF (obj, i);