While testing 1.5.6.2, 1.5.6.3, I noticed a high probability of crashes when compressing large byte sequences. 1.5.6.1 does not reproduce this problem. Here is the reproduced code
require "bundler/inline"
gemfile do
source "https://rubygems.org"
gem "zstd-ruby", ENV.fetch("VERSION", "1.5.6.2")
end
srand 1
Zstd.compress(Random.bytes(0x1fe01fe1)) # Reproduce it even if it is much larger
Random byte sequences are not suitable for compression, of course.
Environment
$ uname -a
Darwin hogelog.local 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 arm64
$ ruby -v
ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
Is this related to #80?
I also tried #81, but that fix didn't seem to resolve this issue.