Comments (5)
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.
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.
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.
Fixed in 2.6.5 (Capped free space parameter to avoid crashing due to 32-bit integer overflow).
from libsais.
Thanks for the fix and worked like a charm!
from libsais.
Related Issues (14)
- UB in libsais_unbwt HOT 1
- multiple vulnerabilities in bzip3 HOT 5
- feature request: binary BWT HOT 1
- segmentation fault when building the suffix array for some large texts HOT 3
- Makefile missing HOT 3
- strange bug in combination with malloc_count HOT 2
- PLCP and LCP arrays for integer suffix trees HOT 1
- Is SA-IS means using induce sort for suffix array? yuta mori has Open source code of SA-IS HOT 2
- intel compiler: libsais64 doesn't produce correct SuffixArray HOT 3
- Overlapping parameters are passed to memcpy HOT 2
- The lib builds has some problem HOT 1
- gnuplot?
- Feature request? HOT 2
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 libsais.