pierrec / node-lz4

LZ4 fast compression algorithm for NodeJS
MIT License
438 stars 98 forks source link

Segmentation fault when encoder chunkSize = 512 #4

Closed wookieb closed 11 years ago

wookieb commented 11 years ago

I have encounter serious problem during encoding file with small chunkSize

Node.js version: 0.10.5

How to reproduce problem:

var fs = require('fs'),
  lz = require('lz4'),
  encoder = lz.createEncoderStream({
    hc: true,
    chunkSize: 512
  });

fs.createReadStream('rfc2616.txt').pipe(encoder).pipe(fs.createWriteStream('test.lz4'));

And i get an error

segmentation fault (core dumped)  node compress.js
pierrec commented 11 years ago

Hello,

Could you try with the latest node version? I have tried with 0.10.9 and it works fine.

Let me know how it goes.

Cheers,

Pierre

wookieb commented 11 years ago

Hello Thank you for the response :)

Unfortunatelly, same problem.

node -v
v0.10.9

System info

Linux 3.8.0-23-generic #34-Ubuntu SMP Wed May 29 20:24:54 UTC 2013 i686 GNU/Linux
pierrec commented 11 years ago

Ok, I will look into it when I get my laptop back, which should happen before the end of the month hopfully.

pierrec commented 11 years ago

Hello,

I have reproduced the issue and it should now be fixed (update your lz4 npm module). Thanks for reporting!

Cheers,

Pierre

wookieb commented 11 years ago

Fantastic. Thank you!