Subject: bug#12402: 24.2.50; Crash switching to ibuffer

From: Eli Zaretskii <[email-masked]>
Date: Mon, 10 Sep 2012 21:13:27 +0300

> Date: Mon, 10 Sep 2012 18:09:54 +0100
> From: Andy Moreton <[email-masked]>
> 
> On 10/09/2012 17:42, Eli Zaretskii wrote:
> >> Date: Mon, 10 Sep 2012 15:41:26 +0100
> >> From: Andy Moreton <[email-masked]>
> >>
> >> During normal editing I tried to switch to the ibuffer buffer, and emacs
> >> aborted (backtrace below). Built from a clean bootstrap of r109965.
> >
> > Any chance of a repeatable recipe?
> >
> Alas no - I've not managed to get it to crash again. What would be useful to 
> look at if I can trigger another abort ?

The entire linked list of heaps, for starters, and the break_value.
The loop before the crash locus shows how:

  for (h = last_heap; h && break_value < h->end; h = h->prev)
    {
      excess += (char *) h->end - (char *) ((break_value < h->bloc_start)
					    ? h->bloc_start : break_value);
    }

I always thought that we should have only one heap on MS-Windows, so
first_heap and last_heap should be the same.  That's because on
Windows we reserve the entire range of addresses at startup, as a
single contiguous chunk.  But maybe I was mistaken...