From 70419f630f60919c8645a10aeef8d299f5098ff5 Mon Sep 17 00:00:00 2001 From: Pip Cet Date: Wed, 3 Jul 2019 11:48:22 +0000 Subject: [PATCH 2/2] Don't alter shared structure in dumped purecopied hash tables. * src/fns.c (hash_table_rehash): Make sure we're operating on fresh copies of ->next, ->index, ->hash. --- src/fns.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fns.c b/src/fns.c index 2fc000a7f4..44d2de523a 100644 --- a/src/fns.c +++ b/src/fns.c @@ -4223,6 +4223,12 @@ hash_table_rehash (struct Lisp_Hash_Table *h) { ptrdiff_t size = HASH_TABLE_SIZE (h); + /* These structures may have been purecopied and shared + (bug#36447). */ + h->next = Fcopy_sequence (h->next); + h->index = Fcopy_sequence (h->index); + h->hash = Fcopy_sequence (h->hash); + /* Recompute the actual hash codes for each entry in the table. Order is still invalid. */ for (ptrdiff_t i = 0; i < size; ++i) -- 2.20.1