Subject: bug#716: Bug in buffer-swap-text (was Re: bug#716: 23.0.60; opening tgz file causes emacs crash)

From: Jason Rumney <[email-masked]>
Date: Mon, 01 Sep 2008 20:12:23 +0800

I've managed to reduce this to a small test case that shows that the bug 
is in new function buffer-swap-text.

Create the following new buffers:

---- test1.txt ----
This is buffer 1
(buffer-swap-text "test2.txt")

---- test2.txt ----
This is buffer 2
(buffer-swap-text "test2.txt")

After creating these buffers, switch to test1.txt buffer and press C-x 
C-e at the end of the second line.
This works fine, and you can swap the two buffers without problem 
repeatedly.

Now, still in test1.txt buffer, C-x RET f binary

Now try C-x C-e on the second line again. Perhaps not on the first try, 
but sooner or later Emacs crashes.