unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Andy Moreton <andrewjmoreton@gmail.com>
Cc: 31245@debbugs.gnu.org
Subject: bug#31245: 27.0.50; Crash in Windows emacs
Date: Mon, 21 May 2018 22:12:20 +0300	[thread overview]
Message-ID: <83r2m4esbv.fsf@gnu.org> (raw)
In-Reply-To: <vz1in7gc2yg.fsf@gmail.com> (message from Andy Moreton on Mon, 21 May 2018 18:51:03 +0100)

> From: Andy Moreton <andrewjmoreton@gmail.com>
> Date: Mon, 21 May 2018 18:51:03 +0100
> 
> I am unlikely to find a recipe to reproduce this, as it only occurs
> after several hours of normal usage of emacs, and does not seem
> correlated to any set of buffers modes, input etc.

So you are saying this is some kind or Heisenbug, something like
memory corruption?  Is it possible that your system is in some kind of
trouble unrelated to Emacs?

> I can now get gdb running sometimes on this system. Let me know anything
> that you would find useful to look at in gdb if I manage to reproduce
> this again.

Emacs aborts because it was asked to pop an empty stack, that's what
happens here.  The question is how did it happen that we are trying to
pop an empty stack.  And the answer is in stuff that happened before
this, which led to this situation.

The bidi iterator keeps state, and here that state somehow became
corrupted.  To understand why, we need at least partially retrace what
happened immediately prior to this abort.  That's why some kind of
recipe, or at least a description of what's in the buffer, is needed.

Do you happen to know what is in the buffer, and how are the overlay
strings arranged in the buffer?

> #2  0x0000000400101ed7 in bidi_pop_it (bidi_it=0xbf9398) at C:/emacs/git/emacs/master/src/bidi.c:947
> No locals.
> #3  0x000000040003cc28 in pop_it (it=0xbf89a0) at C:/emacs/git/emacs/master/src/xdisp.c:6265
>         p = 0xbf8c28
>         from_display_prop = 0x0
>         prev_pos = 0x1e7b7
> #4  0x000000040003a534 in next_overlay_string (it=0xbf89a0) at C:/emacs/git/emacs/master/src/xdisp.c:5662
> No locals.
> #5  0x00000004000411c4 in set_iterator_to_next (it=0xbf89a0, reseat_p=0x1) at C:/emacs/git/emacs/master/src/xdisp.c:7779

This part tells us that we were displaying an overlay string, reached
the end of the overlay string, and popped the iterator stack.  That
causes us to pop the bidi iterator stack as well, but we have found
that the latter is empty, which simply cannot happen when we display
an overlay string, because when we start displaying the overlay
string, we push some data onto the bidi stack.

So I guess this means bidi_pop_it was called twice in a row without an
intervening bidi_push_it.  If you can find out how did that happen, we
may be on the way to solution.

Thanks.





  reply	other threads:[~2018-05-21 19:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-23 13:51 bug#31245: 27.0.50; Crash in Windows emacs Andy Moreton
2018-04-23 15:28 ` Eli Zaretskii
2018-04-23 15:47   ` Andy Moreton
2018-05-01 20:47     ` Andy Moreton
2018-05-02 14:49       ` Eli Zaretskii
2018-05-21 17:51         ` Andy Moreton
2018-05-21 19:12           ` Eli Zaretskii [this message]
2018-05-21 19:43             ` Eli Zaretskii
2019-09-26 19:30             ` Lars Ingebrigtsen

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=83r2m4esbv.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=31245@debbugs.gnu.org \
    --cc=andrewjmoreton@gmail.com \
    /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).