unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 28505@debbugs.gnu.org
Subject: bug#28505: 26.0.60; Crash in Fmove_point_visually
Date: Tue, 19 Sep 2017 18:13:05 +0200	[thread overview]
Message-ID: <87ingefyzy.fsf@blei.turtle-trading.net> (raw)
In-Reply-To: <83shfjgwf8.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 19 Sep 2017 07:11:07 +0300")

>> From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
>> Date: Mon, 18 Sep 2017 23:02:12 +0200
>> 
>> So I recompiled with -O0 and after reading the code I added a few more
>> "p"s in GDB.  I see that "w->current_matrix" has "rows_allocated = 1,
>> nrows = 1", but still "row" was initialized from "rows" and than
>> incremented by "dir" (1).  Is that as it should be?

Eli Zaretskii writes:
> Yes, but the incremented value is then checked for validity with this
> snippet:
>
> 	  if (row < MATRIX_FIRST_TEXT_ROW (w->current_matrix)
> 	      || row > MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w))
> 	    goto simulate_display;

MATRIX_BOTTON_TEXT_ROW calculates "rows + nrows" (plus the mode-line,
but this is the minibuffer, so it does not have a mode-line).  So
despite the name of the macro the result points *after* the bottom row,
not *at* it.  Should that comparison be "row >= BOTTOM"?  I'll try that.
The macro seems to be misnamed though if that is the problem.

benny





  reply	other threads:[~2017-09-19 16:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18 20:09 bug#28505: 26.0.60; Crash in Fmove_point_visually Benjamin Riefenstahl
2017-09-18 21:02 ` Benjamin Riefenstahl
2017-09-19  4:11   ` Eli Zaretskii
2017-09-19 16:13     ` Benjamin Riefenstahl [this message]
2017-09-19 17:13       ` Eli Zaretskii
2017-09-19 19:22         ` Benjamin Riefenstahl
2017-09-20  5:58           ` Eli Zaretskii
2017-09-20 16:27             ` Benjamin Riefenstahl

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ingefyzy.fsf@blei.turtle-trading.net \
    --to=b.riefenstahl@turtle-trading.net \
    --cc=28505@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).