Skip to content

Restrict direct access to sun.misc.Unsafe #43479

@laurentgo

Description

@laurentgo

Describe the enhancement requested

sun.misc.Unsafe is a Java internal class only accessible to classes loaded of the boot classloader, unless one uses reflection to bypass this restriction.

org.apache.arrow.memory.util.MemoryUtil makes it available as a public field to any java classes which is kind of opening a pandora box. As 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 ), remove direct access to sun.misc.Unsafe instance.

Component(s)

Java

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions