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

[Java] Fix jvm crash caused by varint out-of-bound writing #937

Merged
merged 6 commits into from
Oct 4, 2023

Conversation

chaokunyang
Copy link
Collaborator

@chaokunyang chaokunyang commented Oct 4, 2023

What do these changes do?

This PR fix varint encoding jvm crash.

Fury use long to merge 5 bytes writing into one operation, but it just increase index by 4 bytes for interpreter mode. JIT mode has increased index by 8 bytes. If a number happen to be encoded using 5 bytes and the buffer left is less than 8 bytes, fury using unsafe.putLong, which may crash the jvm.

The early G1ParScanThreadState::copy_to_survivor_space crash in #923 may be caused by this bug too.

Related issue number

Closes #938

#923

Check code requirements

  • tests added / passed (if needed)
  • Ensure all linting tests pass, see here for how to run them

@chaokunyang chaokunyang changed the title [Java] Fix varint jvm crash [Java] Fix jvm crash caused by varint out-of-bound writing Oct 4, 2023
@chaokunyang chaokunyang merged commit e081d47 into apache:main Oct 4, 2023
11 checks passed
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

Successfully merging this pull request may close these issues.

[Java] varint interpreter modoe out-of-bound crash
1 participant