diff options
author | eileencodes <eileencodes@gmail.com> | 2021-06-22 14:00:16 -0400 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2021-06-22 14:34:08 -0700 |
commit | 4f77a54f07b17b19e0dd329877ce9895d98c6cad (patch) | |
tree | e76458dc371c2aa34db31260f89ee2be1e0c0a14 /gc.c | |
parent | de779f4a620f408b72004a06545455f5a51a8584 (diff) |
Fix asan error when walking heap for T_PAYLOAD objects
Related to https://bugs.ruby-lang.org/issues/18001
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4597
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3552,16 +3552,18 @@ objspace_each_objects_try(VALUE arg) while (cursor_end < pend) { int payload_len = 0; +#if USE_RVARGC while (cursor_end < pend && BUILTIN_TYPE((VALUE)cursor_end) != T_PAYLOAD) { cursor_end++; } -#if USE_RVARGC //Make sure the Payload header slot is yielded if (cursor_end < pend && BUILTIN_TYPE((VALUE)cursor_end) == T_PAYLOAD) { payload_len = RPAYLOAD_LEN((VALUE)cursor_end); cursor_end++; } +#else + cursor_end = pend; #endif if ((*data->callback)(pstart, cursor_end, sizeof(RVALUE), data->data)) { |