Skip to content

[Java] varint interpreter modoe out-of-bound crash  #938

@chaokunyang

Description

@chaokunyang

Thank you for reporting the problem!
Please make sure what you are reporting is a bug with reproducible steps.

Describe the bug
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.

Expected behavior
Grow 8 bytes early.

To Reproduce
Steps to reproduce the behavior.
Please try to provide a reproducible script.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):
Please specify the versions of Fury, OS, and others such as JDK/Python/Gcc/Clang/Go/NodeJS if they are used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingjava

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions