Coder Social home page Coder Social logo

Comments (2)

u3shit avatar u3shit commented on September 26, 2024

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.

Quintus avatar Quintus commented on September 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.