[foreign-memaccess+abi] RFR: 8310659: The jar tool should support allowing access to restricted methods from executable jars [v8]
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Jun 28 14:14:32 UTC 2023
On Wed, 28 Jun 2023 11:31:12 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Add `Enable-Native-Access` jar attribute. `Enable-Native-Access: true` is equal to passing `--enable-native-access=ALL-UNNAMED` on the command line when running an executable jar (using `-jar <jar file>`).
>>
>> Question: right now I've implemented this to check if the attribute value is exactly `true`, otherwise it is ignored. Should we only allow `true` or `false`, and throw an error on other values?
>>
>> Reviewer note: I've factored some of a test code for analyzing output to `TestEnableNativeAccessBase` for the enable native access tests.
>
> Jorn Vernee has updated the pull request incrementally with one additional commit since the last revision:
>
> don't throw error if Enable-Native-Access is set
Looks good
test/jdk/java/foreign/enablenativeaccess/TestEnableNativeAccessBase.java line 44:
> 42: static final String PANAMA_JNI = "panama_module/" + PANAMA_JNI_CLS;
> 43: static final String UNNAMED = "org.openjdk.foreigntest.unnamed.PanamaMainUnnamedModule";
> 44: static final String REINVOKER = "TestEnableNativeAccessJarManifest$Reinvoker";
Why is this constant defined here?
-------------
Marked as reviewed by mcimadamore (Committer).
PR Review: https://git.openjdk.org/panama-foreign/pull/843#pullrequestreview-1503205972
PR Review Comment: https://git.openjdk.org/panama-foreign/pull/843#discussion_r1245277668
More information about the panama-dev
mailing list