Comments (2)
Okay, this is the problem:
--- lib/xz/stream.rb~ 2021-11-06 14:47:49.272470250 +0100
+++ lib/xz/stream.rb 2021-11-06 16:12:47.648799304 +0100
@@ -118,7 +118,7 @@
pos = 0
until pos > str.bytesize # Do not use >=, that conflicts with #lzma_finish
substr = str[pos, XZ::CHUNK_SIZE]
- @input_buffer_p[0, str.bytesize] = substr
+ @input_buffer_p[0, substr.bytesize] = substr
pos += XZ::CHUNK_SIZE
@lzma_stream.next_in = @input_buffer_p
Even though substr
is only XZ::CHUNK_SIZE
long, that assignment still copies str.bytesize
number of bytes from substr
:
#0 __memmove_avx_unaligned_erms () at ../sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S:269
#1 0x00007f046994ef46 in memcpy (__len=120000, __src=<optimized out>, __dest=<optimized out>) at /usr/include/bits/string_fortified.h:29
#2 ruby_nonempty_memcpy (n=120000, src=<optimized out>, dest=<optimized out>) at ../.././include/ruby/internal/memory.h:269
#3 rb_fiddle_ptr_aset (argc=3, argv=<optimized out>, self=<optimized out>) at pointer.c:719
from ruby-xz.
Thanks for the report, but: I am abandoning this project now. I don’t use it myself anymore and simply don’t have time to further maintain it.
from ruby-xz.
Related Issues (13)
- Remove dependency on io-like HOT 4
- Add methods for determining the approx. (de)compressed size HOT 1
- Sync API with Ruby’s Zlib::GzipFile HOT 2
- ruby-xz breaks Resolv.getaddress in ruby 2.2.x HOT 8
- Invalid archive checksum should raise exception HOT 1
- can't require 'xz' on OS X without adding a symlink
- how to generate a lzma-js compatible string to decode in browser? HOT 1
- Stream (`IO`-like) mode would be great HOT 15
- Memory leak HOT 3
- Add 'io-like' dependency to gemspec. HOT 2
- remove initialize in lib_lzma.rb HOT 1
- Question: what constitutes big amounts of data? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-xz.