diff options
| author | Samuel Williams <samuel.williams@oriontransfer.co.nz> | 2024-11-21 10:02:09 +1300 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-11-20 21:02:16 +0000 |
| commit | b143fd5bd8527da3ddd176a3d6a362d0ab3bc6c7 (patch) | |
| tree | 18c634b7dd73e0772f63c64983890a4f945c8a76 /include/ruby/internal/encoding | |
| parent | b70c1bb1503df69716312ce5b0ad89e9be02d44b (diff) | |
[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]
https://github.com/ruby/zlib/commit/e445cf3c80
Diffstat (limited to 'include/ruby/internal/encoding')
0 files changed, 0 insertions, 0 deletions
