From 80ea7fbad871b2222b16af1bd9f39e1f1828bbd4 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Thu, 30 Nov 2023 14:47:09 -0500 Subject: Pin embedded shared strings Embedded shared strings cannot be moved because strings point into the slot of the shared string. There may be code using the RSTRING_PTR on the stack, which would pin the string but not pin the shared string, causing it to move. --- internal/string.h | 1 - 1 file changed, 1 deletion(-) (limited to 'internal') diff --git a/internal/string.h b/internal/string.h index abb0a536ad..8c481f979e 100644 --- a/internal/string.h +++ b/internal/string.h @@ -64,7 +64,6 @@ VALUE rb_str_upto_endless_each(VALUE, int (*each)(VALUE, VALUE), VALUE); void rb_str_make_embedded(VALUE); size_t rb_str_size_as_embedded(VALUE); bool rb_str_reembeddable_p(VALUE); -void rb_str_update_shared_ary(VALUE str, VALUE old_root, VALUE new_root); RUBY_SYMBOL_EXPORT_END VALUE rb_fstring_new(const char *ptr, long len); -- cgit v1.2.3