From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 15365@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 [thread overview]
Message-ID: <83zjrghnca.fsf@gnu.org> (raw)
In-Reply-To: <8761u5rl5c.fsf@yandex.ru>
> From: Dmitry Gutov <dgutov@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.
next prev parent reply other threads:[~2013-09-13 13:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-13 11:55 bug#15365: 24.3.50; Segfault when calling vc-git-log-edit-toggle-amend Dmitry Gutov
2013-09-13 13:18 ` Eli Zaretskii [this message]
2013-09-14 1:12 ` Dmitry Gutov
2013-09-14 8:02 ` Eli Zaretskii
2013-09-14 8:34 ` martin rudalics
2013-09-14 8:59 ` Eli Zaretskii
2013-09-14 9:47 ` martin rudalics
2013-09-14 10:16 ` Eli Zaretskii
2013-09-14 13:08 ` Dmitry Gutov
2013-09-14 13:45 ` Eli Zaretskii
2013-09-15 3:01 ` Dmitry Gutov
2013-09-15 6:20 ` Eli Zaretskii
2013-09-15 14:53 ` Dmitry Gutov
2013-09-14 13:05 ` Dmitry Gutov
2013-09-14 13:29 ` Eli Zaretskii
2013-09-19 8:23 ` Eli Zaretskii
2013-09-22 5:00 ` Dmitry Gutov
2013-09-22 7:14 ` Eli Zaretskii
2013-09-14 14:37 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83zjrghnca.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=15365@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.