diff options
author | Koichi Sasada <ko1@atdot.net> | 2020-01-13 03:36:47 +0900 |
---|---|---|
committer | NARUSE, Yui <naruse@airemix.jp> | 2020-01-16 15:13:08 +0900 |
commit | 8e8841f6bf58031a1fe5b0dbacb5a1fb442102df (patch) | |
tree | e732a63e29041a07b1bd9a2c02f70a225d70a2f9 /hash.c | |
parent | 48f324e92f9b36edc267f9871e35039cbd1c2eb9 (diff) |
reload AR table body for transient heap.
ar_talbe (Hash representation for <=8 size) can use transient heap
and the memory area can move. So we need to restore `pair' ptr after
`func` call (which can run any programs) because of moving.
[Bug #16503]
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -961,6 +961,7 @@ ar_foreach_check(VALUE hash, st_foreach_check_callback_func *func, st_data_t arg switch (retval) { case ST_CHECK: { + pair = RHASH_AR_TABLE_REF(hash, i); if (pair->key == never) break; ret = ar_find_entry_hint(hash, hint, key); if (ret == RHASH_AR_TABLE_MAX_BOUND) { |