Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bzip core dumps #2

Closed
OrangeDog opened this issue Oct 4, 2011 · 5 comments
Closed

Bzip core dumps #2

OrangeDog opened this issue Oct 4, 2011 · 5 comments

Comments

@OrangeDog
Copy link

var zip = new bzgz2.Bzip();
zip.init({level: 4});
zip.end();

error:

assertion "ret == BZ_FINISH_OK" failed: file "../compress.cc", line 540, function: int Bzip::BzipEnd(char**, int*)
Aborted (core dumped)

The same code using Gzip() instead does not cause this error.

NodeJS v0.4.11, libbz2-devel 1.0.6-2 (cygwin)

@Woodya
Copy link
Owner

Woodya commented Oct 4, 2011

so, you're trying to create an empty bz2 file?
i can look into why that fails i guess. are you really trying to do this? or
just came across this?
-w

On Tue, Oct 4, 2011 at 7:38 AM, OrangeDog <
reply@reply.github.com>wrote:

var zip = new bzgz2.Bzip();
zip.init({level: 4});
zip.end();

error:

assertion "ret == BZ_FINISH_OK" failed: file "../compress.cc", line 540,
function: int Bzip::BzipEnd(char*, int)
Aborted (core dumped)

The same code using Gzip() instead does not cause this error.

NodeJS v0.4.11, libbz2-devel 1.0.6-2 (cygwin)

Reply to this email directly or view it on GitHub:
#2

@OrangeDog
Copy link
Author

There being no documentation on the subject, I was end()ing them when disposing of them lest they leak.

Let alone the undocumented difference between G and B, it really should throw a JS exception rather than dumping core. Behaviour of the latter sort is completely unacceptable in a production environment.

@OrangeDog OrangeDog reopened this Oct 4, 2011
@OrangeDog
Copy link
Author

Actually, I've just modified your test.js to use Bzip and exactly the same error occurs.

@OrangeDog
Copy link
Author

Also on CentOS 5.6 (x64), bzip2-libs 1.0.3

$ node test.js LICENSE
Got : 1125
File opened
Compressed chunk size : 0
assertion "ret == BZ_FINISH_OK" failed: file "../compress.cc", line 540, function: int Bzip::BzipEnd(char**, int*)
Aborted (core dumped)

@Woodya Woodya closed this as completed Oct 9, 2011
@OrangeDog
Copy link
Author

This problem seems to be resolved with version 0.1.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants