-
Notifications
You must be signed in to change notification settings - Fork 170
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
ZstdInputStreamNoFinalizer / ZstdOutputStreamNoFinalizer may leak buf… #303
Conversation
…fers when these are not arrray based. Motivation: We need to put the buffers back in the pool in case of validation failure as otherwise the buffer will leak. Modifications: Handle validation and buffer lifecycle via a static helper method Result: No more leak possible
@luben something I noticed while reviewing some code. |
LGTM, can you fix or remove this test https://github.com/luben/zstd-jni/blob/master/src/test/scala/Zstd.scala#L1098-L1107 |
@luben fixed |
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #303 +/- ##
============================================
+ Coverage 59.74% 59.87% +0.13%
Complexity 307 307
============================================
Files 26 26
Lines 1473 1473
Branches 170 170
============================================
+ Hits 880 882 +2
+ Misses 436 435 -1
+ Partials 157 156 -1 |
Thanks for the contribution! |
Just noticed this was merged without squashing which makes the history a bit messy :/ |
:) not big deal |
Thank you all! |
### What changes were proposed in this pull request? This PR aims to upgrade `zstd-jni` to 1.5.6-1. ### Why are the changes needed? This release has the following memory-leak bug fix. - https://github.com/luben/zstd-jni/releases/tag/v1.5.6-1 - luben/zstd-jni#303 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #1865 from dongjoon-hyun/ORC-1670. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
### What changes were proposed in this pull request? This PR aims to upgrade `zstd-jni` to 1.5.6-1. ### Why are the changes needed? This release has the following memory-leak bug fix. - https://github.com/luben/zstd-jni/releases/tag/v1.5.6-1 - luben/zstd-jni#303 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #1865 from dongjoon-hyun/ORC-1670. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]> (cherry picked from commit 1830e86) Signed-off-by: Dongjoon Hyun <[email protected]>
### What changes were proposed in this pull request? This PR aims to upgrade `zstd-jni` to 1.5.6-1. ### Why are the changes needed? This release has the following memory-leak bug fix. - https://github.com/luben/zstd-jni/releases/tag/v1.5.6-1 - luben/zstd-jni#303 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #45756 from dongjoon-hyun/SPARK-47630. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
### What changes were proposed in this pull request? This PR aims to upgrade `zstd-jni` to 1.5.6-1. ### Why are the changes needed? This release has the following memory-leak bug fix. - https://github.com/luben/zstd-jni/releases/tag/v1.5.6-1 - luben/zstd-jni#303 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#45756 from dongjoon-hyun/SPARK-47630. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
This PR aims to upgrade `zstd-jni` to 1.5.6-1. This release has the following memory-leak bug fix. - https://github.com/luben/zstd-jni/releases/tag/v1.5.6-1 - luben/zstd-jni#303 No. Pass the CIs. No. Closes apache#45756 from dongjoon-hyun/SPARK-47630. Authored-by: Dongjoon Hyun <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
…fers when these are not arrray based.
Motivation:
We need to put the buffers back in the pool in case of validation failure as otherwise the buffer will leak.
Modifications:
Handle validation and buffer lifecycle via a static helper method
Result:
No more leak possible