Git Product home page Git Product logo

Comments (5)

IlyaGrebnov avatar IlyaGrebnov commented on July 22, 2024

The issue is likely due to 32-bit arithmetic overflow (somewhere in look-ahead / prefetch logic). Note, maximum theoretical size would be 2GB - 1 (due to EOF / sentinel symbol), but I recommend switching to libsais64 few KBs before 2GB limit. And for my own compressors (bsc and bsc-m03) I limit block size by 2047 MB.

from libsais.

wupengcheng6819 avatar wupengcheng6819 commented on July 22, 2024

As it turns out, the program crashes only with extra space. In my case, the file size is 2047MB, which runs fine with 0 extra space; The extra space size is around 1G when it crashes, and the debug error message is:

Program received signal SIGSEGV, Segmentation fault.
0x00000000004098bd in libsais_compact_unique_and_nonunique_lms_suffixes_32s ()

from libsais.

IlyaGrebnov avatar IlyaGrebnov commented on July 22, 2024

Thank you. Now I know where problem is. n + fs value is overflowing signed 32-bit integer. I will add fix for this in next few days by capping fs parameter values to correct range. That said, for large files (>100MB) you typically do not need any extra free space as libsais should be able to carve enough unused space inside suffix array itself.

from libsais.

IlyaGrebnov avatar IlyaGrebnov commented on July 22, 2024

Fixed in 2.6.5 (Capped free space parameter to avoid crashing due to 32-bit integer overflow).

from libsais.

wupengcheng6819 avatar wupengcheng6819 commented on July 22, 2024

Thanks for the fix and worked like a charm!

from libsais.

Related Issues (14)

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.