bazel
bazel copied to clipboard
Replacement of Unsafe code
Description of the feature request:
Greetings!
I notice that sun.misc.Unsafe
appears in the 7.3.0 release version, and Unsafe accesses off-heap memory, which will be potentially deprecated in the future Java version. I wonder whether your team will replace Unsafe and ByteBuffer with FFM in Java 22, which is safer without losing high performance.
Which category does this issue belong to?
Java Rules, Performance
What underlying problem are you trying to solve with this feature?
Unsafety due to usage of sun.misc.Unsafe
Which operating system are you running Bazel on?
Mac OS 14.6.1
What is the output of bazel info release
?
release 7.3.0- (@non-git)
If bazel info release
returns development version
or (@non-git)
, tell us how you built Bazel.
env EXTRA_BAZEL_ARGS="--tool_java_runtime_version=22" bash ./compile.sh
What's the output of git remote get-url origin; git rev-parse HEAD
?
[email protected]:Software-Aurora-Lab/Benchmarks-for-LLM.git
08dd0ec8cb9b23ec32b1ae1b73be16b0e8c9d2b7
(That's my own public repo)
Have you found anything relevant by searching the web?
JEP471 (https://openjdk.org/jeps/471) indicates the way to remove Unsafe.
Any other information, logs, or outputs that you want to share?
No response