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

Lz4NativeCompressor fails uncleanly if native is not available #263

Open
JanecekPetr opened this issue Nov 8, 2024 · 0 comments
Open

Lz4NativeCompressor fails uncleanly if native is not available #263

JanecekPetr opened this issue Nov 8, 2024 · 0 comments

Comments

@JanecekPetr
Copy link

On Windows the native implementations of (de)compressors are not available. They usually fail cleanly with an okay message, however Lz4NativeCompressor instead fails with

java.lang.IllegalArgumentException: The provided allocation size is negative: -1
        at java.base/jdk.internal.foreign.Utils.checkNonNegativeArgument(Utils.java:221)
        at java.base/jdk.internal.foreign.Utils.checkAllocationSizeAndAlign(Utils.java:206)
        at java.base/jdk.internal.foreign.ArenaImpl.allocateNoInit(ArenaImpl.java:54)
        at java.base/jdk.internal.foreign.ArenaImpl.allocate(ArenaImpl.java:60)
        at java.base/java.lang.foreign.SegmentAllocator.allocate(SegmentAllocator.java:645)
        at io.airlift.compress.v3.lz4.Lz4NativeCompressor.<init>(Lz4NativeCompressor.java:25)

There's a field which should only be assigned after the is-native-enabled check passes in the constructor.

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

1 participant