diff options
| author | Pip Cet | 2019-07-03 11:48:22 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2019-07-09 16:15:29 -0400 |
| commit | de229df09c012ed9c394a479e8bea4e9f175c4d1 (patch) | |
| tree | 4e80e1c57193006904fb697a4e3c9e485fb6bcfe /src/fns.c | |
| parent | 3078e6d2fb9b2acf785be11de465f6410acaa5fc (diff) | |
| download | emacs-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/fns.c')
| -rw-r--r-- | src/fns.c | 6 |
1 files changed, 6 insertions, 0 deletions
| @@ -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) |