| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
[ruby/zlib] Mask checksums to lower 32bits
Upper bits affect the result of `crc32` in zlib 1.2.12.
https://github.com/ruby/zlib/commit/9ab6d04af1
---
ext/zlib/zlib.c | 12 +++++++++---
test/zlib/test_zlib.rb | 2 ++
2 files changed, 11 insertions(+), 3 deletions(-)
|
|
|
|
| |
zlib-1.2.12.
|
|
|
|
| |
(cherry picked from commit 82c8acbcfd3197e19620dc6024d08c85ea99a05b)
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
This commit removes usages of rb_gc_force_recycle since it is a burden
to maintain and makes changes to the GC difficult.
|
|
|
|
| |
https://github.com/ruby/zlib/commit/82e9a636a6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
https://github.com/ruby/zlib/commit/dd593acaee
|
|
|
|
| |
https://github.com/ruby/zlib/commit/434eba55ae
|
| |
|
|
|
|
| |
https://github.com/ruby/zlib/commit/44a56d36e7
|
|
|
|
| |
https://github.com/ruby/zlib/commit/931aa7a272
|
|
|
|
| |
https://github.com/ruby/zlib/commit/098c50255d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
* Prefix "./" to the import library name to expanded when static
linking exts.
* Copy zlib shared library to the top build directory.
|
|
|
|
| |
* See [Feature #17752]
|
|
|
|
|
|
| |
Remove the list of executables.
https://github.com/ruby/zlib/commit/6a70725b8e
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
https://github.com/ruby/zlib/commit/7d3d19710f
|
| |
|
|
|
|
|
|
|
|
|
|
| |
If a buffer keyword argument is given, it is used as the buffer,
instead of creating new strings. This can result in significantly
lower memory usage during inflation.
Implements #19
https://github.com/ruby/zlib/commit/dac9a9b57d
|
|
|
|
|
|
|
|
|
| |
This reads from the IO in 8192 byte chunks, so you don't need to
have the entire string in memory.
Fixes #16
https://github.com/ruby/zlib/commit/ba9793c550
|
|
|
|
|
|
|
|
| |
This behavior differs from File#gets.
Fixes [Bug #13904]
https://github.com/ruby/zlib/commit/448e41efdd
|
|
|
|
|
|
|
|
|
| |
This commit deletes
{IO,ARGF,StringIO,Zib::GZipReader}#{bytes,chars,lines,codepoints}, which
have been deprecated since c47c095b9740e7c19d6fdca29ab661c1089221d4.
Note that String also has those methods. They are neither depreacted
nor deleted because they are not aliases of counterpart each_something.
|
|
|
|
|
|
|
|
| |
* cast to suppress C4267 warnings; no possible loss of data as
following the comparison.
* shift base address to suppress LNK4281; although /DYNAMICBASE is
preferable, not sure from which version of link.exe supports it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gz file
Most gzip tools support concatenated gz streams in a gz file. This
offers a way to handle such gz files in Ruby.
Fixes [Bug #9790]
Fixes [Bug #11180]
Fixes [Bug #14804]
https://github.com/ruby/zlib/commit/e2ce56de7d
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
To fix build failures.
|
|
|
|
| |
This shall fix compile errors.
|
|
|
| |
Split ruby.h
|
|
|
|
| |
https://github.com/ruby/zlib/commit/5af77c1ee8
|
| |
|
|
|
|
| |
https://github.com/ruby/zlib/commit/3e98e4cac3
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change, it was not possible to write out zero for the
timestamp part of a Gzip file's header, as calling GzipWriter#mtime with
zero was ignored.
Judging from the docs for `GzipWriter#mtime=`, it should be possible to
indicate that no timestamp is available by calling the method with zero.
https://github.com/ruby/zlib/commit/310be39cac
|
|
|
|
|
|
|
|
| |
Ruby 2.7 deprecates taint and it no longer has an effect.
The lack of taint support should not cause a problem in
previous Ruby versions.
https://github.com/ruby/zlib/commit/21711ed0ce
|
|
|
|
| |
https://github.com/ruby/zlib/commit/00ead8cb2c
|
|
|
|
| |
https://github.com/ruby/zlib/commit/8f43b264cd
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cfuncs that use rb_scan_args with the : entry suffer similar keyword
argument separation issues that Ruby methods suffer if the cfuncs
accept optional or variable arguments.
This makes the following changes to : handling.
* Treats as **kw, prompting keyword argument separation warnings
if called with a positional hash.
* Do not look for an option hash if empty keywords are provided.
For backwards compatibility, treat an empty keyword splat as a empty
mandatory positional hash argument, but emit a a warning, as this
behavior will be removed in Ruby 3. The argument number check
needs to be moved lower so it can correctly handle an empty
positional argument being added.
* If the last argument is nil and it is necessary to treat it as an option
hash in order to make sure all arguments are processed, continue to
treat the last argument as the option hash. Emit a warning in this case,
as this behavior will be removed in Ruby 3.
* If splitting the keyword hash into two hashes, issue a warning, as we
will not be splitting hashes in Ruby 3.
* If the keyword argument is required to fill a mandatory positional
argument, continue to do so, but emit a warning as this behavior will
be going away in Ruby 3.
* If keyword arguments are provided and the last argument is not a hash,
that indicates something wrong. This can happen if a cfunc is calling
rb_scan_args multiple times, and providing arguments that were not
passed to it from Ruby. Callers need to switch to the new
rb_scan_args_kw function, which allows passing of whether keywords
were provided.
This commit fixes all warnings caused by the changes above.
It switches some function calls to *_kw versions with appropriate
kw_splat flags. If delegating arguments, RB_PASS_CALLED_KEYWORDS
is used. If creating new arguments, RB_PASS_KEYWORDS is used if
the last argument is a hash to be treated as keywords.
In open_key_args in io.c, use rb_scan_args_kw.
In this case, the arguments provided come from another C
function, not Ruby. The last argument may or may not be a hash,
so we can't set keyword argument mode. However, if it is a
hash, we don't want to warn when treating it as keywords.
In Ruby files, make sure to appropriately use keyword splats
or literal keywords when calling Cfuncs that now issue keyword
argument separation warnings through rb_scan_args. Also, make
sure not to pass nil in place of an option hash.
Work around Kernel#warn warnings due to problems in the Rubygems
override of the method. There is an open pull request to fix
these issues in Rubygems, but part of the Rubygems tests for
their override fail on ruby-head due to rb_scan_args not
recognizing empty keyword splats, which this commit fixes.
Implementation wise, adding rb_scan_args_kw is kind of a pain,
because rb_scan_args takes a variable number of arguments.
In order to not duplicate all the code, the function internals need
to be split into two functions taking a va_list, and to avoid passing
in a ton of arguments, a single struct argument is used to handle
the variables previously local to the function.
|
|
|
|
|
|
| |
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is
dangerous and should be extinct. This commit deletes ANYARGS from
rb_ensure, which also revealed many arity / type mismatches.
|
|
|
|
|
|
| |
After 5e86b005c0f2ef30df2f9906c7e2f3abefe286a2, I now think ANYARGS is
dangerous and should be extinct. This commit deletes ANYARGS from
rb_rescue / rb_rescue2, which revealed many arity / type mismatches.
|
| |
|