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

LeakSanitizer warns memory leaks #32

Closed
hongxuchen opened this issue Feb 7, 2019 · 1 comment
Closed

LeakSanitizer warns memory leaks #32

hongxuchen opened this issue Feb 7, 2019 · 1 comment

Comments

@hongxuchen
Copy link

At https://github.com/jnovy/pxz/blob/master/pxz.c#L338, the allocated memory is not freed. The problem is that when there are many files to be processed at once (e.g., ./pxz -k -T 8 -q -f c-input/*, and since the maximum argument length is 131072 on my machine, c.f. here), it may eat up memories -- the allocations are inside a loop traversing the input files. Since each time the leaked memory is 25169920 on my machine, 25169920*131072=3.2990718e+12bytes, which is roughly 3200Gigabytes.
When the command lasts for a long time, it may also slowdown the host machine.

Also, as seen in #31, there is no upper bound limit for the specified thread number, this may lead to quick segfault.

@jnovy
Copy link
Owner

jnovy commented May 7, 2019

This is now fixed and merged to master.

@jnovy jnovy closed this as completed May 7, 2019
@hongxuchen hongxuchen changed the title LeakSanitizer warnings memory leaks LeakSanitizer warns memory leaks May 7, 2019
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