aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPip Cet2019-07-03 11:48:22 +0000
committerStefan Monnier2019-07-09 16:15:29 -0400
commitde229df09c012ed9c394a479e8bea4e9f175c4d1 (patch)
tree4e80e1c57193006904fb697a4e3c9e485fb6bcfe /src
parent3078e6d2fb9b2acf785be11de465f6410acaa5fc (diff)
downloademacs-de229df09c012ed9c394a479e8bea4e9f175c4d1.tar.gz
emacs-de229df09c012ed9c394a479e8bea4e9f175c4d1.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/fns.c6
1 files changed, 6 insertions, 0 deletions
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)
4224{ 4224{
4225 ptrdiff_t size = HASH_TABLE_SIZE (h); 4225 ptrdiff_t size = HASH_TABLE_SIZE (h);
4226 4226
4227 /* These structures may have been purecopied and shared
4228 (bug#36447). */
4229 h->next = Fcopy_sequence (h->next);
4230 h->index = Fcopy_sequence (h->index);
4231 h->hash = Fcopy_sequence (h->hash);
4232
4227 /* Recompute the actual hash codes for each entry in the table. 4233 /* Recompute the actual hash codes for each entry in the table.
4228 Order is still invalid. */ 4234 Order is still invalid. */
4229 for (ptrdiff_t i = 0; i < size; ++i) 4235 for (ptrdiff_t i = 0; i < size; ++i)