byroot (Jean Boussier) wrote in #note-48: > as it's a new contention point for Ractors, and if the main thread fork while a background ractor is holding this lock, the child will likely end up deadlocking at some point. That's a valid c...himura467 (Akito Shitara)
byroot (Jean Boussier) wrote in #note-46: > If `RSTRING_PTR` never allocates, it means it doesn't provide NUL termination anymore, right? Regardless of whether it's the optimal approach, I think an implementation like https://github....himura467 (Akito Shitara)
mame (Yusuke Endoh) wrote in #note-43: > Please provide a quantitative evaluation of performance and compatibility at the application level. Does this change bring an observable performance improvement? Does memory usage increase or dec...himura467 (Akito Shitara)
IMO, backward compatibility of `RSTRING_PTR` should be preserved within the scope of this feature. Eregon (Benoit Daloze) wrote in #note-30: > I' believe migrating usages of `RSTRING_PTR()` which want `\0`-terminated to `StringValueC...himura467 (Akito Shitara)
rhenium (Kazuki Yamaguchi) wrote in #note-23: > I wonder if `RSTRING_PTR()` could instead allocate a read-only copy dedicated for `RSTRING_PTR()`, rather than permanently converting the String away from `STR_SHARED`. Interesting. The...himura467 (Akito Shitara)
Eregon (Benoit Daloze) wrote in #note-22: > What's the problem? If `RSTRING_END()` remains unchanged, it can cause inconsistency due to the undefined evaluation order of C. This happens if `RSTRING_END()` is evaluated before `RSTRIN...himura467 (Akito Shitara)
* [Feature #19315] Lazy substrings in CRuby * I created a prototype implementation: https://github.com/ruby/ruby/pull/17045 * This is also a prerequisite for [Feature #22056]. * Proposed approach: * Keep `RSTRING_PTR()` behavio...himura467 (Akito Shitara)
byroot (Jean Boussier) wrote in #note-19: > > However, it is unclear if RSTRING_PTR() is ever called without the GVL in practice. I would appreciate feedback on whether this edge-case handling is actually necessary or redundant. > ... ...himura467 (Akito Shitara)
Following the direction suggested by @Eregon in #note-17, I created a prototype implementation for this issue: https://github.com/ruby/ruby/pull/17045 While maintaining backward compatibility with `RSTRING_PTR()` and `RSTRING_END()`, th...himura467 (Akito Shitara)
`io_buffer_not` accessed `buffer->base` directly without validating that the buffer was still live. A slice whose parent had been freed retained its stale base pointer, so calling `~` on it caused a UAF. Use `io_buffer_get_bytes_for_rea...himura467 (Akito Shitara)