On 5/29/20 1:03 PM, Mandy Chung wrote:
CSR: https://bugs.openjdk.java.net/browse/JDK-8246108
As CSR is approved, I went ahead and pushed this patch:
http://cr.openjdk.java.net/~mchung/jdk15/webrevs/8245432/webrev.03/
This version has fixed the range check issue Johannes caught and also
added
On 5/29/20 4:31 PM, Johannes Kuhn wrote:
Thanks.
Noted that readInt can read outside of the byte array when it is
shorter than 4 bytes, throwing an ArrayIndexOutOfBoundsException.
Same applies for readUnsignedShort.
Test cases for malformedClassFiles:
new byte[3], new byte[] {0xCA, 0xFE, 0
On 30/05/2020 6:03 am, Mandy Chung wrote:
On 5/28/20 9:18 PM, David Holmes wrote:
On 29/05/2020 1:52 pm, Mandy Chung wrote:
On 5/28/20 5:44 PM, David Holmes wrote:
This is to validate the given version. The runtime will check if
preview feature is enabled when such class file is loaded. I
Thanks.
Noted that readInt can read outside of the byte array when it is shorter
than 4 bytes, throwing an ArrayIndexOutOfBoundsException.
Same applies for readUnsignedShort.
Test cases for malformedClassFiles:
new byte[3], new byte[] {0xCA, 0xFE, 0xBA, 0xBE, 0x00}
- Johannes
On 29-May-20
On 5/28/20 9:18 PM, David Holmes wrote:
On 29/05/2020 1:52 pm, Mandy Chung wrote:
On 5/28/20 5:44 PM, David Holmes wrote:
This is to validate the given version. The runtime will check if
preview feature is enabled when such class file is loaded. I will
make a comment to make it clear.
On 5/29/20 11:29 AM, Alan Bateman wrote:
I went through webrev.02 and the only issue is the magic is read as a
u2 when it should be u4, otherwise looks good.
Thanks. Updated in place:
http://cr.openjdk.java.net/~mchung/jdk15/webrevs/8245432/webrev.02/index.html
Mandy
It's fixed. Thanks
Mandy
On 5/28/20 4:35 PM, Johannes Kuhn wrote:
Hi,
just noticed a small thing:
The magic is 4 bytes, but readUnsignedShort reads two bytes.
- Johannes
On 28-May-20 19:25, Mandy Chung wrote:
On 5/28/20 6:55 AM, Alan Bateman wrote:
On 28/05/2020 05:13, Mandy Chung wrote:
On 29/05/2020 04:52, Mandy Chung wrote:
On 5/28/20 5:44 PM, David Holmes wrote:
This is to validate the given version. The runtime will check if
preview feature is enabled when such class file is loaded. I will
make a comment to make it clear.
Okay but I thought the intent here was to
À: "mandy chung" , "core-libs-dev"
, "Remi Forax"
Envoyé: Mercredi 27 Mai 2020 18:16:33
Objet: Re: RFR: JDK-8245432: Lookup::defineHiddenClass should
throw UnsupportedClassVersionError if the given bytes are
of an unsupported major or minor version
On 26/05/2020 22:46,
SM.
Rémi
- Mail original -
De: "Alan Bateman"
À: "mandy chung" , "core-libs-dev"
, "Remi Forax"
Envoyé: Mercredi 27 Mai 2020 18:16:33
Objet: Re: RFR: JDK-8245432: Lookup::defineHiddenClass should
throw UnsupportedClassVersionError if the given bytes ar
Hi,
just noticed a small thing:
The magic is 4 bytes, but readUnsignedShort reads two bytes.
- Johannes
On 28-May-20 19:25, Mandy Chung wrote:
On 5/28/20 6:55 AM, Alan Bateman wrote:
On 28/05/2020 05:13, Mandy Chung wrote:
Updated webrev:
http://cr.openjdk.java.net/~mchung/jdk15/webrevs/82
Mercredi 27 Mai 2020 18:16:33
Objet: Re: RFR: JDK-8245432: Lookup::defineHiddenClass should
throw UnsupportedClassVersionError if the given bytes are
of an unsupported major or minor version
On 26/05/2020 22:46, Mandy Chung wrote:
Lookup::defineHiddenClass currently throws IAE by ASM i
On 28/05/2020 18:25, Mandy Chung wrote:
:
The runtime will ensure if --enable-preview is set if a class file
with minor is loaded. I will prefer to keep
VM::isSupportedClassFileVersion to validate the given major/minor
version. At runtime, it will fail when such class file is loaded if
pr
émi
- Mail original -
De: "Alan Bateman"
À: "mandy chung" , "core-libs-dev"
, "Remi Forax"
Envoyé: Mercredi 27 Mai 2020 18:16:33
Objet: Re: RFR: JDK-8245432: Lookup::defineHiddenClass should
throw UnsupportedClassVersionError if the given b
On 5/28/20 6:55 AM, Alan Bateman wrote:
On 28/05/2020 05:13, Mandy Chung wrote:
Updated webrev:
http://cr.openjdk.java.net/~mchung/jdk15/webrevs/8245432/webrev.01/
I modify this patch to check the class file version and throws CFE if
unsupported before creating ClassReader. This also fixes
On 28/05/2020 05:13, Mandy Chung wrote:
Updated webrev:
http://cr.openjdk.java.net/~mchung/jdk15/webrevs/8245432/webrev.01/
I modify this patch to check the class file version and throws CFE if
unsupported before creating ClassReader. This also fixes JDK-8245061
that it reads the value of `th
rittle than catching the IAE thrown by ASM.
Rémi
- Mail original -
De: "Alan Bateman"
À: "mandy chung" , "core-libs-dev"
, "Remi Forax"
Envoyé: Mercredi 27 Mai 2020 18:16:33
Objet: Re: RFR: JDK-8245432: Lookup::defineHiddenClass should throw
Unsupporte
On 5/27/20 12:24 AM, David Holmes wrote:
Hi Mandy,
On 27/05/2020 7:46 am, Mandy Chung wrote:
Lookup::defineHiddenClass currently throws IAE by ASM if the given
bytes are of unsupported class file version. The implementation
should catch and throw UnsupportedClassVersionError instead.
webr
t;Remi Forax"
Envoyé: Mercredi 27 Mai 2020 18:16:33
Objet: Re: RFR: JDK-8245432: Lookup::defineHiddenClass should throw
UnsupportedClassVersionError if the given bytes are
of an unsupported major or minor version
On 26/05/2020 22:46, Mandy Chung wrote:
Lookup::defineHiddenClass currently
-
De: "Alan Bateman"
À: "mandy chung" , "core-libs-dev"
, "Remi Forax"
Envoyé: Mercredi 27 Mai 2020 18:16:33
Objet: Re: RFR: JDK-8245432: Lookup::defineHiddenClass should throw
UnsupportedClassVersionError if the given bytes are
of an unsupported major
Rémi
- Mail original -
> De: "Alan Bateman"
> À: "mandy chung" , "core-libs-dev"
> , "Remi Forax"
>
> Envoyé: Mercredi 27 Mai 2020 18:16:33
> Objet: Re: RFR: JDK-8245432: Lookup::defineHiddenClass should throw
> UnsupportedClassVers
On 26/05/2020 22:46, Mandy Chung wrote:
Lookup::defineHiddenClass currently throws IAE by ASM if the given
bytes are of unsupported class file version. The implementation
should catch and throw UnsupportedClassVersionError instead.
webrev:
http://cr.openjdk.java.net/~mchung/jdk15/webrevs/8
Hi Mandy,
On 27/05/2020 7:46 am, Mandy Chung wrote:
Lookup::defineHiddenClass currently throws IAE by ASM if the given bytes
are of unsupported class file version. The implementation should catch
and throw UnsupportedClassVersionError instead.
webrev:
http://cr.openjdk.java.net/~mchung/jdk15
Lookup::defineHiddenClass currently throws IAE by ASM if the given bytes
are of unsupported class file version. The implementation should catch
and throw UnsupportedClassVersionError instead.
webrev:
http://cr.openjdk.java.net/~mchung/jdk15/webrevs/8245432/webrev.00/
This patch also includes
24 matches
Mail list logo