[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: corrected report for Emacs crash on WIN32 with slime
From: |
martin rudalics |
Subject: |
Re: corrected report for Emacs crash on WIN32 with slime |
Date: |
Fri, 13 Apr 2007 10:46:50 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
If slime is up and running and M-x slime is called again you are asked if
you
want to start an addtional inferior lisp. If this question is answered with
n
Emacs will crash. The action that triggers the crash is (kill-buffer "
*cl-connection*")
Can you reproduce the bug with the attached (100% unreliable) patch?
*** buffer.h.~1.109.~ Tue Jan 23 06:41:24 2007
--- buffer.h Fri Apr 13 10:00:56 2007
***************
*** 518,523 ****
--- 518,519 ----
/* Set nonzero whenever the narrowing is changed in this buffer. */
int clip_changed;
+ /* Set nonzero when kill_buffer is in progress for this buffer. */
+ int kill_buffer_in_progress;
+
/* If the long line scan cache is enabled (i.e. the buffer-local
variable cache-long-line-scans is non-nil), newline_cache
points to the newline cache, and width_run_cache points to the
*** buffer.c.~1.525.~ Mon Apr 2 07:45:22 2007
--- buffer.c Fri Apr 13 10:20:08 2007
***************
*** 693,698 ****
--- 693,699 ----
b->last_window_start = 1;
/* It is more conservative to start out "changed" than "unchanged". */
b->clip_changed = 0;
+ b->kill_buffer_in_progress = 0;
b->prevent_redisplay_optimizations_p = 1;
b->backed_up = Qnil;
b->auto_save_modified = 0;
***************
*** 1361,1369 ****
b = XBUFFER (buf);
! /* Avoid trouble for buffer already dead. */
! if (NILP (b->name))
return Qnil;
/* Query if the buffer is still modified. */
if (INTERACTIVE && !NILP (b->filename)
--- 1362,1371 ----
b = XBUFFER (buf);
! /* Avoid trouble for buffer already dead or about being killed. */
! if ((NILP (b->name)) || (b->kill_buffer_in_progress))
return Qnil;
+ b->kill_buffer_in_progress = 1;
/* Query if the buffer is still modified. */
if (INTERACTIVE && !NILP (b->filename)
***************
*** 1374,1380 ****
b->name, make_number (0)));
UNGCPRO;
if (NILP (tem))
! return Qnil;
}
/* Run hooks with the buffer to be killed the current buffer. */
--- 1376,1385 ----
b->name, make_number (0)));
UNGCPRO;
if (NILP (tem))
! {
! b->kill_buffer_in_progress = 0;
! return Qnil;
! }
}
/* Run hooks with the buffer to be killed the current buffer. */
***************
*** 1390,1396 ****
arglist[0] = Qkill_buffer_query_functions;
tem = Frun_hook_with_args_until_failure (1, arglist);
if (NILP (tem))
! return unbind_to (count, Qnil);
/* Then run the hooks. */
Frun_hooks (1, &Qkill_buffer_hook);
--- 1395,1404 ----
arglist[0] = Qkill_buffer_query_functions;
tem = Frun_hook_with_args_until_failure (1, arglist);
if (NILP (tem))
! {
! b->kill_buffer_in_progress = 0;
! return unbind_to (count, Qnil);
! }
/* Then run the hooks. */
Frun_hooks (1, &Qkill_buffer_hook);
***************
*** 1403,1412 ****
/* Don't kill the minibuffer now current. */
if (EQ (buf, XWINDOW (minibuf_window)->buffer))
! return Qnil;
if (NILP (b->name))
! return Qnil;
/* When we kill a base buffer, kill all its indirect buffers.
We do it at this stage so nothing terrible happens if they
--- 1411,1426 ----
/* Don't kill the minibuffer now current. */
if (EQ (buf, XWINDOW (minibuf_window)->buffer))
! {
! b->kill_buffer_in_progress = 0;
! return Qnil;
! }
if (NILP (b->name))
! {
! b->kill_buffer_in_progress = 0;
! return Qnil;
! }
/* When we kill a base buffer, kill all its indirect buffers.
We do it at this stage so nothing terrible happens if they
***************
*** 1438,1444 ****
tem = Fother_buffer (buf, Qnil, Qnil);
Fset_buffer (tem);
if (b == current_buffer)
! return Qnil;
}
/* Notice if the buffer to kill is the sole visible buffer
--- 1452,1461 ----
tem = Fother_buffer (buf, Qnil, Qnil);
Fset_buffer (tem);
if (b == current_buffer)
! {
! b->kill_buffer_in_progress = 0;
! return Qnil;
! }
}
/* Notice if the buffer to kill is the sole visible buffer
***************
*** 1448,1454 ****
{
tem = Fother_buffer (buf, Qnil, Qnil);
if (EQ (buf, tem))
! return Qnil;
}
/* Now there is no question: we can kill the buffer. */
--- 1465,1474 ----
{
tem = Fother_buffer (buf, Qnil, Qnil);
if (EQ (buf, tem))
! {
! b->kill_buffer_in_progress = 0;
! return Qnil;
! }
}
/* Now there is no question: we can kill the buffer. */
***************
*** 1520,1525 ****
--- 1540,1546 ----
reset_buffer_local_variables (b, 1);
b->name = Qnil;
+ b->kill_buffer_in_progress = 0;
BLOCK_INPUT;
if (! b->base_buffer)