You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bad use of OutOfMemoryError to validate buffer size #629
This's a bad way to validate buffer size as explain here.
And another serious consequence, catching OutOfMemoryError in Java code requires the applications not to use JVM options like CrashOnOutOfMemoryError or ExitOnOutOfMemoryError to automatically restart the JVM when it runs out of memory.
I'm wondering if there is a specific reason why that could not be a simple conditional validation?
Activity
xerial commentedon Feb 4, 2025
There wasn't any specific reason for that. It's better to be fixed as you suggested.
duongkame commentedon Feb 26, 2025
Thanks for your reply @xerial. I filed a PR: https://github.com/xerial/snappy-java/pull/647/files.
xerial commentedon Jul 20, 2025
Fixed in #647. Thanks!