From: Pip Cet Date: Wed, 3 Jul 2019 11:48:22 +0000 (+0000) Subject: Don't alter shared structure in dumped purecopied hash tables. X-Git-Tag: emacs-27.0.90~2033 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=de229df09c012ed9c394a479e8bea4e9f175c4d1;p=emacs.git 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. --- diff --git a/src/fns.c b/src/fns.c index 11f5dddc858..7343556ac21 100644 --- a/src/fns.c +++ b/src/fns.c @@ -4224,6 +4224,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)