[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master de229df: Don't alter shared structure in dumped pur
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] master de229df: Don't alter shared structure in dumped purecopied hash tables. |
Date: |
Tue, 9 Jul 2019 16:15:36 -0400 (EDT) |
branch: master
commit de229df09c012ed9c394a479e8bea4e9f175c4d1
Author: Pip Cet <address@hidden>
Commit: Stefan Monnier <address@hidden>
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 11f5ddd..7343556 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master de229df: Don't alter shared structure in dumped purecopied hash tables.,
Stefan Monnier <=