Subject: bug#18180: 24.3.92; Segfault in mark_object

From: Dmitry Antipov <[email-masked]>
Date: Mon, 04 Aug 2014 13:15:32 +0400

On 08/04/2014 10:46 AM, Mat Smiglarski wrote:

> I have not been able to reproduce this by automating the calls to stress-speed-read.

Reproduced with (dotimes (i 100) (stress-speed-read (current-buffer)))).

Ugh, it seems that we never initialize undo-list of indirect buffer.  You can use
this trivial fix just to avoid crash:

=== modified file 'src/buffer.c'
--- src/buffer.c	2014-07-27 13:21:30 +0000
+++ src/buffer.c	2014-08-04 09:06:08 +0000
@@ -825,6 +825,7 @@
    name = Fcopy_sequence (name);
    set_string_intervals (name, NULL);
    bset_name (b, name);
+  bset_undo_list (b, BVAR (b->base_buffer, undo_list));

    reset_buffer (b);
    reset_buffer_local_variables (b, 1);

But this bug raises an interesting question: should an indirect buffer's undo list
be always the same as the one of its base buffer?

Dmitry