GNU bug report logs - #15365
24.3.50; Segfault when calling vc-git-log-edit-toggle-amend

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Fri, 13 Sep 2013 11:57:02 UTC

Severity: normal

Found in version 24.3.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 15365 <at> debbugs.gnu.org
Subject: bug#15365: 24.3.50; Segfault when calling vc-git-log-edit-toggle-amend
Date: Fri, 13 Sep 2013 16:18:13 +0300
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Fri, 13 Sep 2013 14:55:27 +0300
> 
> Edit a file in a Git repository, then press
> 
> C-x v v, then C-c C-e

Too bad this requires to commit to a git repo.  If you cannot find a
recipe that doesn't need that, please show values of variables
involved in this abort.  The relevant code fragment is this:

      /* If window start is unchanged, we can reuse the whole matrix
	 as is, after adjusting glyph positions.  No need to compute
	 the window end again, since its offset from Z hasn't changed.  */
      r0 = MATRIX_FIRST_TEXT_ROW (current_matrix);
      if (CHARPOS (start) == MATRIX_ROW_START_CHARPOS (r0) + Z_delta
	  && BYTEPOS (start) == MATRIX_ROW_START_BYTEPOS (r0) + Z_delta_bytes
	  /* PT must not be in a partially visible line.  */
	  && !(PT >= MATRIX_ROW_START_CHARPOS (row) + Z_delta
	       && MATRIX_ROW_BOTTOM_Y (row) > window_text_bottom_y (w)))
	{
	  /* Adjust positions in the glyph matrix.  */
	  if (Z_delta || Z_delta_bytes)
	    {
	      struct glyph_row *r1
		= MATRIX_BOTTOM_TEXT_ROW (current_matrix, w);
	      increment_matrix_positions (w->current_matrix,
					  MATRIX_ROW_VPOS (r0, current_matrix),
					  MATRIX_ROW_VPOS (r1, current_matrix),
					  Z_delta, Z_delta_bytes);
	    }

	  /* Set the cursor.  */
	  row = row_containing_pos (w, PT, r0, NULL, 0);
	  if (row)
	    set_cursor_from_row (w, row, current_matrix, 0, 0, 0, 0);
	  else
	    emacs_abort ();
	  return 1;
	}

So the values of PT, Z, and Z_BYTE are important.  Also, the following
GDB commands can tell important details:

  (gdb) pmtxrows current_matrix

Note that you need to be in the call-stack frame of this code, frame
#3 according to the backtrace you show, to be able to reference these
variables.

Thanks.

> (gdb) xbacktrace
> "redisplay_internal (C function)" (0xbf6108)
> (gdb)
> 
> (For all I know, the above may be not accurate, because I loaded the
> src/.gdbinit file only after Emacs started up, worked and crashed.)

It is accurate.  However, if you start GDB from the Emacs's src
directory, you will be free of that doubt.




This bug report was last modified 11 years and 337 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.