[foreign-memaccess+abi] RFR: 8310659: The jar tool should support allowing access to restricted methods from executable jars [v4]

Jorn Vernee jvernee at openjdk.org
Wed Jun 28 11:31:16 UTC 2023


On Wed, 28 Jun 2023 10:28:32 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> (That said, we still have a problem, in that, by the time we get to LauncherHelper, ModuleBootstrap has already ran. But perhaps we can delay initialization of `HAS_ENABLE_NATIVE_ACCESS_FLAG` on first use, and make the field stable).
>
>> once a manifest specifies the Enable-Native-Access attribute, can the command line still add other modules in the trusted bubble? If yes, that's ok. If no, then we have a problem.
> 
> The answer is "yes", and I've added some extra tests that verify that as well.
> 
> I've pushed the new implementation that only allows `ALL-UNNAMED` as a value for `Enable-Native-Access`. I've kept this mutable flag for now, but added a comment as well. (until we figure out what we want to do here)

After some offline discussion, we decided to go back to not throwing an error when Enable-Native-Access is set in the manifest, and another module attempts a native access. Based on the facts that, the warning behavior is temporary any way, and it is unlikely for an executable jar to depend on another (external) module.

-------------

PR Review Comment: https://git.openjdk.org/panama-foreign/pull/843#discussion_r1245070738


More information about the panama-dev mailing list