diff options
author | Koichi Sasada <ko1@atdot.net> | 2020-01-13 03:36:47 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2020-01-13 03:36:47 +0900 |
commit | 350dafd56a9cff58d36303aeb7515ab41c5dbbb3 (patch) | |
tree | 335ad38f4e6446262fd0e70310faea01162d3ee7 /hash.c | |
parent | e288632f22b18b29efd20a1469292b0a3ba9b74c (diff) | |
download | ruby-350dafd56a9cff58d36303aeb7515ab41c5dbbb3.tar.gz |
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.
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -974,6 +974,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) { |