Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 18:44:18 GMT, Daniel Fuchs wrote: >> I think the method is called during module bootstrap - I don't think there >> is a race in practice. This method is also called in other parts of >> ModuleBootstrap. The code you allude to is called during initialization of >> the

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 19:02:57 GMT, Daniel Fuchs wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address first batch of review comments > >

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Daniel Fuchs
On Wed, 28 Apr 2021 10:42:54 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-412 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] -

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Daniel Fuchs
On Wed, 28 Apr 2021 18:19:14 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/jdk/internal/module/IllegalNativeAccessChecker.java >> line 78: >> >>> 76: int index = 0; >>> 77: // the system property is removed after decoding >>> 78: String value =

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Mandy Chung
On Wed, 28 Apr 2021 18:26:30 GMT, Maurizio Cimadamore wrote: > test/jdk/jdk/internal/reflect/CallerSensitive/CheckCSMs.java Yes that's the test. That test misses to catch your case where aliasing may be possible. - PR: https://git.openjdk.java.net/jdk/pull/3699

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 17:53:44 GMT, Daniel Fuchs wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address first batch of review comments > >

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 18:23:41 GMT, Mandy Chung wrote: > > I believe that we had to move @CallerSensitive out of interfaces because > > there was a test that was checking that @cs was not put on "virtual" > > methods. > > Good if we do have such test. We need to re-examine this with the

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Mandy Chung
On Wed, 28 Apr 2021 10:42:54 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-412 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] -

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 18:07:32 GMT, Daniel Fuchs wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address first batch of review comments > >

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 18:02:03 GMT, Mandy Chung wrote: > I reviewed the `--enable-native-access` related change that looks fine. > > > Access to restricted methods from any other module not in the list is > > disallowed and will result in an IllegalAccessException. > > I think you meant to say

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Daniel Fuchs
On Wed, 28 Apr 2021 10:42:54 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-412 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] -

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Mandy Chung
On Wed, 28 Apr 2021 10:42:54 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-412 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] -

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Daniel Fuchs
On Wed, 28 Apr 2021 10:42:54 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-412 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] -

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Alan Bateman
On Wed, 28 Apr 2021 13:47:43 GMT, Maurizio Cimadamore wrote: >> src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/CLinker.java >> line 270: >> >>> 268: >>> 269: /** >>> 270: * Converts a Java string into a null-terminated C string, using >>> the platform's default

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 12:47:36 GMT, Chris Hegarty wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address first batch of review comments > >

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 13:08:26 GMT, Chris Hegarty wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address first batch of review comments > >

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Chris Hegarty
On Wed, 28 Apr 2021 10:42:54 GMT, Maurizio Cimadamore wrote: >> This PR contains the API and implementation changes for JEP-412 [1]. A more >> detailed description of such changes, to avoid repetitions during the review >> process, is included as a separate comment. >> >> [1] -

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
On Wed, 28 Apr 2021 09:10:37 GMT, Chris Hegarty wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address first batch of review comments > >

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Chris Hegarty
On Wed, 28 Apr 2021 09:06:29 GMT, Chris Hegarty wrote: >> Maurizio Cimadamore has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Address first batch of review comments > >

Re: RFR: 8264774: Implementation of Foreign Function and Memory API (Incubator) [v2]

2021-04-28 Thread Maurizio Cimadamore
> This PR contains the API and implementation changes for JEP-412 [1]. A more > detailed description of such changes, to avoid repetitions during the review > process, is included as a separate comment. > > [1] - https://openjdk.java.net/jeps/412 Maurizio Cimadamore has updated the pull