Re: RFR: 8308549: Classfile API should fail to generate over-sized Code attribute [v2]

2023-05-24 Thread Jaikiran Pai
On Wed, 24 May 2023 12:57:59 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/classfile/impl/DirectCodeBuilder.java >> line 314: >> >>> 312: >>> 313: int codeLength = curPc(); >>> 314: if (codeLength >= 65536) { >> >> Hello Adam, looking at

Re: RFR: 8308549: Classfile API should fail to generate over-sized Code attribute [v2]

2023-05-24 Thread Adam Sotona
> Classfile API allowed to generate Code attribute exceeding the 65k limit. No > exception has been thrown during class generation and the class failed > verification later during class loading. > This patch adds Code size limit check throwing IllegalArgumentException. > The patch also adds

Re: RFR: 8308549: Classfile API should fail to generate over-sized Code attribute

2023-05-24 Thread Adam Sotona
On Wed, 24 May 2023 12:04:05 GMT, Jaikiran Pai wrote: >> Classfile API allowed to generate Code attribute exceeding the 65k limit. No >> exception has been thrown during class generation and the class failed >> verification later during class loading. >> This patch adds Code size limit check

Re: RFR: 8308549: Classfile API should fail to generate over-sized Code attribute

2023-05-24 Thread Jaikiran Pai
On Tue, 23 May 2023 12:54:20 GMT, Adam Sotona wrote: > Classfile API allowed to generate Code attribute exceeding the 65k limit. No > exception has been thrown during class generation and the class failed > verification later during class loading. > This patch adds Code size limit check

Re: RFR: 8308549: Classfile API should fail to generate over-sized Code attribute

2023-05-24 Thread Adam Sotona
On Tue, 23 May 2023 15:13:04 GMT, Chen Liang wrote: > On a side note, does Classfile API reject methods with too many slots > (locals) (MethodTypeDesc can represent parameter lists with over 255 slots) > or stack (operand)? Classfile API does not perform any extra verifications of

Re: RFR: 8308549: Classfile API should fail to generate over-sized Code attribute

2023-05-23 Thread Mandy Chung
On Tue, 23 May 2023 12:54:20 GMT, Adam Sotona wrote: > Classfile API allowed to generate Code attribute exceeding the 65k limit. No > exception has been thrown during class generation and the class failed > verification later during class loading. > This patch adds Code size limit check

Re: RFR: 8308549: Classfile API should fail to generate over-sized Code attribute

2023-05-23 Thread Chen Liang
On Tue, 23 May 2023 12:54:20 GMT, Adam Sotona wrote: > Classfile API allowed to generate Code attribute exceeding the 65k limit. No > exception has been thrown during class generation and the class failed > verification later during class loading. > This patch adds Code size limit check

RFR: 8308549: Classfile API should fail to generate over-sized Code attribute

2023-05-23 Thread Adam Sotona
Classfile API allowed to generate Code attribute exceeding the 65k limit. No exception has been thrown during class generation and the class failed verification later during class loading. This patch adds Code size limit check throwing IllegalArgumentException. The patch also adds similar check