RFR: 8299505: findVirtual on array classes incorrectly restricts the receiver type

2023-05-06 Thread Chen Liang
The access hack for array class clone is only applied to `checkAccess` but missing before call to `restrictProtectedReceiver`, causing the array receiver type to be incorrectly replaced by the lookupClass type. This patch fixes that and adds a test to ensure an original lookup resolves `clone` f

Re: RFR: 8299505: findVirtual on array classes incorrectly restricts the receiver type

2023-05-30 Thread Mandy Chung
On Sat, 6 May 2023 18:15:56 GMT, Chen Liang wrote: > The access hack for array class clone is only applied to `checkAccess` but > missing before call to `restrictProtectedReceiver`, causing the array > receiver type to be incorrectly replaced by the lookupClass type. This patch > fixes that an

Re: RFR: 8299505: findVirtual on array classes incorrectly restricts the receiver type

2023-05-30 Thread Mandy Chung
On Tue, 30 May 2023 23:38:16 GMT, Mandy Chung wrote: >> The access hack for array class clone is only applied to `checkAccess` but >> missing before call to `restrictProtectedReceiver`, causing the array >> receiver type to be incorrectly replaced by the lookupClass type. This patch >> fixes t

Re: RFR: 8299505: findVirtual on array classes incorrectly restricts the receiver type [v2]

2023-05-30 Thread Chen Liang
On Tue, 30 May 2023 23:39:52 GMT, Mandy Chung wrote: >> test/jdk/java/lang/invoke/findVirtual/FindVirtualArrayCloneTest.java line 28: >> >>> 26: * @bug 8299505 >>> 27: * @run junit FindVirtualArrayCloneTest >>> 28: * @summary Ensures Arrays' clone doesn't have incorrect receiver type >>> bou

Re: RFR: 8299505: findVirtual on array classes incorrectly restricts the receiver type [v2]

2023-05-30 Thread Chen Liang
> The access hack for array class clone is only applied to `checkAccess` but > missing before call to `restrictProtectedReceiver`, causing the array > receiver type to be incorrectly replaced by the lookupClass type. This patch > fixes that and adds a test to ensure an original lookup resolves `

Re: RFR: 8299505: findVirtual on array classes incorrectly restricts the receiver type [v2]

2023-05-30 Thread Mandy Chung
On Wed, 31 May 2023 01:40:22 GMT, Chen Liang wrote: >> The access hack for array class clone is only applied to `checkAccess` but >> missing before call to `restrictProtectedReceiver`, causing the array >> receiver type to be incorrectly replaced by the lookupClass type. This patch >> fixes th

Re: RFR: 8299505: findVirtual on array classes incorrectly restricts the receiver type [v2]

2023-05-30 Thread Chen Liang
On Wed, 31 May 2023 01:42:17 GMT, Mandy Chung wrote: >> Chen Liang has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains three additional >> commits s

Re: RFR: 8299505: findVirtual on array classes incorrectly restricts the receiver type [v2]

2023-05-30 Thread Mandy Chung
On Wed, 31 May 2023 03:43:25 GMT, Chen Liang wrote: >> test/jdk/java/lang/invoke/findVirtual/FindVirtualArrayCloneTest.java line 70: >> >>> 68: var cloneMh = MethodHandles.lookup() >>> 69: .findVirtual(String[].class, "clone", >>> MethodType.methodType(Object.class)); >>

Re: RFR: 8299505: findVirtual on array classes incorrectly restricts the receiver type [v3]

2023-05-30 Thread Chen Liang
> The access hack for array class clone is only applied to `checkAccess` but > missing before call to `restrictProtectedReceiver`, causing the array > receiver type to be incorrectly replaced by the lookupClass type. This patch > fixes that and adds a test to ensure an original lookup resolves `