зеркало из https://github.com/github/ruby.git
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.
This commit is contained in:
Родитель
e288632f22
Коммит
350dafd56a
1
hash.c
1
hash.c
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче