diff options
author | Jean Boussier <[email protected]> | 2025-06-06 21:01:24 +0200 |
---|---|---|
committer | Jean Boussier <[email protected]> | 2025-06-06 23:07:22 +0200 |
commit | 90ba2f4e1c60324f4d4a958a8a28bc2bbd1968b7 () | |
tree | b4f81530303d39d6f1bb9bb3eceac1de6c4950f6 | |
parent | 347e581a4cbe2bbf7c13532038f2a68b0b37099a (diff) |
Add missing lock around `redblack_cache_ancestors`
This used to be protected because all shape code was under a lock, but now that the shape tree is lock-free we still need to lock around the red-black cache. Co-Authored-By: Luke Gruber <[email protected]>
Notes: Merged: https://.com/ruby/ruby/pull/13552
-rw-r--r-- | shape.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -530,7 +530,9 @@ rb_shape_alloc_new_child(ID id, rb_shape_t *shape, enum shape_type shape_type) RUBY_ASSERT(new_shape->capacity > shape->next_field_index); new_shape->next_field_index = shape->next_field_index + 1; if (new_shape->next_field_index > ANCESTOR_CACHE_THRESHOLD) { - redblack_cache_ancestors(new_shape); } break; case SHAPE_ROOT: |