News for hackers. Stuff that matters.
Re:FFM (Foreign Function and Memory API) Goes Final by _old_dude_ on Monday December 11, 2023 @05:10AM (#38599191)
Developers should understand if a dependency use C bindings. But why bother end users with a command line flag.

Perhaps there is a manifest entry/flag so the command line flag is not required ?

Re:FFM (Foreign Function and Memory API) Goes Final by pron on Monday December 11, 2023 @05:57AM (#38599448)
1. Application developers frequently don't know how the libraries they're using work, and often don't even know what libraries they're using because they're transitive dependencies (even a version update of a library can pull in a new transitive dependency). If a library imposes any kind of risk on the application, the application has to acknowledge that it accepts it.

2. The last word is given to the application, and the point is that libraries must not make decisions that have a global impact on behalf of the application. That's why an executable JAR, i.e. an application, can grant such permission in its manifest but library JARs cannot.

See more here: https://openjdk.org/jeps/8305968, https://openjdk.org/jeps/8307341

Re:FFM (Foreign Function and Memory API) Goes Final by josephcsible on Monday December 11, 2023 @02:33PM (#38604360)
> an executable JAR, i.e. an application, can grant such permission in its manifest

No it can't. If it would, then the change indeed wouldn't be a problem. Oracle has removed --illegal-access=permit completely, and --add-opens doesn't let you specify wildcards.

Re:FFM (Foreign Function and Memory API) Goes Final by pron on Monday December 11, 2023 @06:18PM (#38606831)
The question I answered was about --enable-native-access, not --add-opens. --add-opens indicates an actual problem in the program that has to be fixed, so of course we don't allow wildcards. You can still specify that in the manifest even without wildcards, though.