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

Memory-Access Methods in sun.misc.Unsafe are deprecated for removal #511

Open
cushon opened this issue Jan 13, 2025 · 2 comments
Open

Memory-Access Methods in sun.misc.Unsafe are deprecated for removal #511

cushon opened this issue Jan 13, 2025 · 2 comments
Assignees
Labels
Type: bug Something isn't working

Comments

@cushon
Copy link

cushon commented Jan 13, 2025

Describe the bug, including details regarding any error messages, version, and platform.

In JDK 24, JEP 498: Warn upon Use of Memory-Access Methods in sun.misc.Unsafe deprecates several memory access methods in sun.misc.Unsafe for removal.

These methods are used by arrow here https://github.com/laurentgo/arrow/blob/fa8ebdebd1109217a6ac1ae2f173e1ab9d400d82/java/memory/memory-core/src/main/java/org/apache/arrow/memory/util/MemoryUtil.java#L30

apache/arrow#43479 is related, it refactored uses of these APIs to consolidate the references in MemoryUtil, and mentions that change is

a first step towards switching from sun.misc.Unsafe to safer memory access methods (which may become a requirement at some point as discussed in JEP 471 )

Are there plans to switch to safer memory access methods?

Component(s)

Java

@cushon cushon added the Type: bug Something isn't working label Jan 13, 2025
@kou kou transferred this issue from apache/arrow Jan 14, 2025
@vibhatha
Copy link
Contributor

@cushon Yes, we have discussed this in the past and there have been several efforts started to do this migration. But this may require some incremental improvements.

Please refer to the discussions and older PRs focused on this direction.

  1. [Java] Implement arrow-memory-ffm #163
  2. GH-37739: [Java] Add experimental arrow-memory-ffm module arrow#38016
  3. WIP: [Java] Require Java 22 to build Arrow arrow#43050

@jbonofre jbonofre self-assigned this Feb 5, 2025
@jbonofre
Copy link
Member

jbonofre commented Feb 5, 2025

I'm resuming our work on this one.
I think it's an important one as it "blocks" the update to Java 22/23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants