summaryrefslogtreecommitdiff
path: root/ext/zlib
AgeCommit message (Collapse)Author
2024-12-13[ruby/zlib] Bump up v3.2.1Hiroshi SHIBATA
https://github.com/ruby/zlib/commit/d2e29b23c8
2024-11-20[ruby/zlib] Add support for safe offload of nogvl code.Samuel Williams
(https://github.com/ruby/zlib/pull/89) https://github.com/ruby/zlib/commit/a535271862
2024-11-20[ruby/zlib] Don't call `rb_str_set_len` while released the GVL.Samuel Williams
(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
2024-11-12[ruby/zlib] Bump up v3.2.0Hiroshi SHIBATA
https://github.com/ruby/zlib/commit/7bb6d982fe
2024-10-24[ruby/zlib] Reduce `ensure` nestingNobuyoshi Nakada
https://github.com/ruby/zlib/commit/5a02eac37f
2024-10-24[ruby/zlib] Tell gcc-14 that `Qnil` is not passed to `gzfile_calc_crc`Nobuyoshi Nakada
Suppress false positive warnings due to a bug in gcc-14 optimizer. https://github.com/ruby/zlib/commit/eb1cf426c2
2024-10-12[DOC] Fix spellingJohn Bampton
Notes: Merged: https://github.com/ruby/ruby/pull/11884 Merged-By: nobu <[email protected]>
2024-08-31[ruby/zlib] Bump up 3.1.1Takashi Kokubun
https://github.com/ruby/zlib/commit/d756bb0a0f
2024-05-29[ruby/zlib] Update license files with ruby/rubyHiroshi SHIBATA
https://github.com/ruby/zlib/commit/8341fa2e20
2024-05-14[ruby/zlib] Avoid double copying into provided outbufSamuel Giddins
https://github.com/ruby/zlib/commit/07f44b7546
2024-05-14[ruby/zlib] Avoid allocating intermediary strings when read/readpartial are ↵Samuel Giddins
passed an outbuf This accounts for a significant number of string allocations when reading rubygems, but we can avoid that in many places by only copying into the outbuf when present https://github.com/ruby/zlib/commit/d25ef406c1
2024-04-27ruby tool/update-deps --fix卜部昌平
2024-02-22[ruby/zlib] In Zlib::GzipReader#eof? check if we're actually at eofMartin Emde
Only consider it eof if we read ahead and something fills the buf. If not, we may only have empty blocks and the footer. Fixes https://github.com/ruby/zlib/pull/56 https://github.com/ruby/zlib/commit/437bea8003
2023-11-07[ruby/zlib] Bump up 3.1.0Hiroshi SHIBATA
https://github.com/ruby/zlib/commit/2561e122ac
2023-11-07[ruby/zlib] Support Ruby 2.5+ againHiroshi SHIBATA
https://github.com/ruby/zlib/commit/661ea3ec5f
2023-10-26[ruby/zlib] Check for z_size_t along with {crc,adler}32_z inKJ Tsanaktsidis
extconf.rb (https://github.com/ruby/zlib/pull/69) The android NDK (android-ndk-r21e) does not have crc32_z, adler32_z, nor z_size_t in its zlib.h header file. However, it _does_ have the crc32_z and adler32_z symbols in the libz.a static library! mkmf performs two tests for have_func: * It sees if a program that includes the header and takes the address of the symbol can compile * It sees if a program that defines the symbol as `extern void sym_name()` and calls it can be linked If either test works, it considers the function present. The android-ndk-r21e is passing the second test but not the first for crc32_z/adler32_z. So, we define HAVE_ZLIB_SIZE_T_FUNCS, but then can't actually compile the extension (since the prototypes aren't in the header file). We can keep this working how it was working before by _also_ checking for `have_type("z_size_t", "zlib.h")`. The have_type check _only_ looks in the header file for the type; if a program including the header file and using the type can't compile, the type is considered absent regardless of what might be in libz.a. https://github.com/ruby/zlib/commit/3b9fe962d8
2023-10-26[ruby/zlib] Fix misdetection of {crc32,alder32}_z in cloudflare zlib forkKJ Tsanaktsidis
We use the Cloudflare fork of zlib (https://github.com/cloudflare/zlib), which we find gives improved performance on AWS Graviton ARM instances. That fork does not define crc32_z and alder32_z functions. Until two days ago, Ruby's zlib gem worked fine, because cloudflare zlib _also_ did not define z_size_t, which meant Ruby did not try and use these functions. Since https://github.com/cloudflare/zlib/commit/a3ba99596d6271224d39ef9d6853511f51821e05 however, cloudflare zlib _does_ define z_size_t (but NOT crc32_z or alder32_z). The zlib gem would try and use these nonexistant functions and not compile. This patch fixes it by actually specifically detecting the functions that the gem wants to call, rather than just the presence of the z_size_t type. https://github.com/ruby/zlib/commit/c96e8b9a57
2023-08-10[ruby/zlib] Zlib.gunzip should not fail with utf-8 stringsSorah Fukumori
(https://github.com/ruby/zlib/pull/55) zstream_discard_input was encoding and character-aware when given input is user-provided, so this discards `len` chars instead of `len` bytes. Also Zlib.gunzip explains in its rdoc that it is equivalent with the following code, but this doesn't fail for UTF-8 String. ```ruby string = %w[1f8b0800c28000000003cb48cdc9c9070086a6103605000000].pack("H*").force_encoding('UTF-8') sio = StringIO.new(string) p gz.read #=> "hello" gz&.close p Zlib.gunzip(string) #=> Zlib::DataError ``` Reported and discovered by eagletmt at https://twitter.com/eagletmt/status/1689692467929694209 https://github.com/ruby/zlib/commit/c5e58bc62a
2023-02-28Update the depend filesMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/7310
2023-02-27Remove intern/gc.h from Make depsMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/7330
2023-02-08Extract include/ruby/internal/attr/packed_struct.hNobuyoshi Nakada
Split `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED` macros into the macros bellow: * `RBIMPL_ATTR_PACKED_STRUCT_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_END` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END` Notes: Merged: https://github.com/ruby/ruby/pull/7268
2023-01-09[ruby/zlib] Check for functions with arguments and the headerNobuyoshi Nakada
With arguments, mkmf skips compilation check for the function as RHS. https://github.com/ruby/zlib/commit/9ed9d6d36e
2022-12-05[ruby/zlib] Bump version to 3.0.0Hiroshi SHIBATA
https://github.com/ruby/zlib/commit/f1ce5e3e8d
2022-04-05Removed mswin patch for zlib-1.2.11Hiroshi SHIBATA
2022-04-02[ruby/zlib] Use `z_size_t` version functionsNobuyoshi Nakada
https://github.com/ruby/zlib/commit/1ce6625fff
2022-04-02[ruby/zlib] Mask checksums to lower 32bits on also IL32 platformsNobuyoshi Nakada
https://github.com/ruby/zlib/commit/e1ead85113
2022-04-02[ruby/zlib] Mask checksums to lower 32bitsNobuyoshi Nakada
Upper bits affect the result of `crc32` in zlib 1.2.12. https://github.com/ruby/zlib/commit/9ab6d04af1
2022-02-22[Feature #18249] Update dependenciesPeter Zhu
Notes: Merged: https://github.com/ruby/ruby/pull/5474
2022-02-22[ruby/zlib] [DOC] Fix typo in Zlib.adler32_combineMau Magnaguagno
https://github.com/ruby/zlib/commit/5e8f0b4164
2021-12-25Prevent installing zlib libraryNARUSE, Yui
2021-11-24[ruby/zlib] [Bug #18358] Fix crash in zlib when in progressPeter Zhu
When Zlib::Inflate#inflate or Zlib::Deflate#deflate is called recursively inside the block, a crash can occur because of an use-after-free bug. https://github.com/ruby/zlib/commit/50fb8a0338
2021-11-21Update dependenciesNobuyoshi Nakada
2021-11-08[Feature #18290] Remove all usages of rb_gc_force_recyclePeter Zhu
This commit removes usages of rb_gc_force_recycle since it is a burden to maintain and makes changes to the GC difficult. Notes: Merged: https://github.com/ruby/ruby/pull/4363
2021-10-19[ruby/zlib] Bump up zlib version to 2.1.1Hiroshi SHIBATA
https://github.com/ruby/zlib/commit/82e9a636a6
2021-10-15[ruby/zlib] Fix a bug that GZipReader#gets may return incomplete lineSutou Kouhei
See also: https://github.com/ruby/csv/issues/117#issuecomment-933289373 How to reproduce with x.csv.gz in the issue comment: Zlib::GzipReader.open("x.csv.gz") do |rio| rio.gets(nil, 1024) while line = rio.gets(nil, 8192) raise line unless line.valid_encoding? end end Reported by Dimitrij Denissenko. Thanks!!! https://github.com/ruby/zlib/commit/b1f182e98f
2021-10-14[ruby/zlib] Bump up zlib version to 2.1.0Hiroshi SHIBATA
https://github.com/ruby/zlib/commit/dd593acaee
2021-10-14[ruby/zlib] Bump version to v2.0.0Hiroshi SHIBATA
https://github.com/ruby/zlib/commit/434eba55ae
2021-10-05ruby tool/update-deps --fix卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/4909
2021-08-31[ruby/zlib] Don't print out warnings when finalizingNobuyoshi Nakada
https://github.com/ruby/zlib/commit/44a56d36e7
2021-08-31[ruby/zlib] Revert "Don't print out warnings when freeing."Nobuyoshi Nakada
https://github.com/ruby/zlib/commit/931aa7a272
2021-08-31[ruby/zlib] Don't print out warnings when freeing.Samuel Williams
https://github.com/ruby/zlib/commit/098c50255d
2021-07-28[ruby/zlib] Synchronize access to zstream to prevent segfault in ↵Jeremy Evans
multithreaded use I'm not sure whether this handles all multithreaded use cases, but this handles the example that crashes almost immediately and does 10,000,000 total deflates using 100 separate threads. To prevent the tests from taking forever, the committed test for this uses only 10,000 deflates across 10 separate threads, which still causes a segfault in the previous implementation almost immediately. Fixes [Bug #17803] https://github.com/ruby/zlib/commit/4b1023b3f2
2021-07-06Found library is not usable if the header is not foundNobuyoshi Nakada
2021-07-03Fix linking bundled zlibNobuyoshi Nakada
* Prefix "./" to the import library name to expanded when static linking exts. * Copy zlib shared library to the top build directory.
2021-05-04Fix -Wundef warnings for HAVE_RB_EXT_RACTOR_SAFEBenoit Daloze
* See [Feature #17752] Notes: Merged: https://github.com/ruby/ruby/pull/4428
2021-04-20[ruby/zlib] gemspec: Remove unused filesOlle Jonsson
Remove the list of executables. https://github.com/ruby/zlib/commit/6a70725b8e
2021-04-13dependency updates卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/4371
2021-03-17Adjusted indents [ci skip]Nobuyoshi Nakada
2021-03-17zlib: fix Gzip{Writer,Reader}.new fails with a O_TMPFILE fileSorah Fukumori
2021-03-09[ruby/zlib] Resume zstream if available [Bug #10961]wanabe
Notes: Merged: https://github.com/ruby/ruby/pull/4248