ruby/test/zlib
Samuel Williams b143fd5bd8 [ruby/zlib] Don't call rb_str_set_len while released the GVL.
(https://github.com/ruby/zlib/pull/88)

* Only release the GVL where necessary.

- Several string manipulation methods were invoked while the GVL was
  released. This is unsafe.
- The mutex protecting multi-threaded access was not covering buffer state
  manipulation, leading to data corruption and out-of-bounds writes.
- Using `rb_str_locktmp` prevents changes to buffer while it's in use.

[Bug #20863]

e445cf3c80
2024-11-20 21:02:16 +00:00
..
test_zlib.rb [ruby/zlib] Don't call rb_str_set_len while released the GVL. 2024-11-20 21:02:16 +00:00