eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.27k stars 721 forks source link

[Hidden classes] Centralize classfile parsing in the cfreader.c code #10513

Open DanHeidinga opened 4 years ago

DanHeidinga commented 4 years ago

My proposal was that MethodHandleNatives.checkClassBytes return the classname as a String to avoid partially reparsing the classfile. The checks in getClassName can still be done in java code after renaming the method to something like validateClassName.

            String targetClassName = MethodHandleNatives.checkClassBytes(bytes);
            validateClassName(targetClassName, bytes);

_Originally posted by @DanHeidinga in https://github.com/eclipse/openj9/pull/10471#discussion_r482303395_

DanHeidinga commented 4 years ago

See list of issues with this approach in https://github.com/eclipse/openj9/pull/10471#discussion_r482500245

DanHeidinga commented 4 years ago

Rationale - https://github.com/eclipse/openj9/pull/10471#issuecomment-686236542

pshipton commented 4 years ago

Moving to the backlog.