RFR 8171132: Improve class reading of invalid or out-of-range ConstantValue attributes

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Tue Jan 3 11:24:49 UTC 2017


Pushed - thanks

Maurizio


On 15/12/16 19:02, Maurizio Cimadamore wrote:
>
> Thanks - I will push this in the next few days
>
> Maurizio
>
>
> On 15/12/16 18:11, Liam Miller-Cushon wrote:
>> Done: http://cr.openjdk.java.net/~cushon/8171132/webrev.03/ 
>> <http://cr.openjdk.java.net/%7Ecushon/8171132/webrev.03/>
>>
>> On Thu, Dec 15, 2016 at 5:29 AM, Maurizio Cimadamore 
>> <maurizio.cimadamore at oracle.com> wrote:
>>
>>     Looks good - the only minor issue is that the new resource keys
>>     should probably be excluded in the examples-not-yet.txt file
>>     (otherwise diags test will fail). We typically try and provide an
>>     example of all diagnostics generated by javac. IN case of errors
>>     that are hard to reproduce (and classfile errors related to bad
>>     classfiles definitively fall in this category), we typically just
>>     omit the diagnostic key from the test (albeit it will be nice one
>>     day to have an example for _all_ diagnostics).
>>
>>     Maurizio
>>
>>
>>     On 15/12/16 01:16, Liam Miller-Cushon wrote:
>>>     On Wed, Dec 14, 2016 at 12:31 PM, Alex Buckley
>>>     <alex.buckley at oracle.com> wrote:
>>>
>>>         I'm not sure which spec you're asking about ... the JLS, for
>>>         example, doesn't mention reading class files so it can't be
>>>         that. I mentioned "quality-of-implementation detail" to
>>>         highlight that javac can react to the ConstantValue
>>>         attribute for Lib.B (or Test.TWO I guess) how ever it
>>>         wishes. javac could convert the value on Monday, zero it on
>>>         Tuesday, and throw error every other day.
>>>
>>>
>>>     Thanks! I was asking about the JVMS, which I understand doesn't
>>>     require a class file to be rejected for this reason. I now
>>>     realize it doesn't disallow that.
>>>
>>>     I updated the change to report an error on out-of-range values:
>>>     http://cr.openjdk.java.net/~cushon/8171132/webrev.02/
>>>     <http://cr.openjdk.java.net/%7Ecushon/8171132/webrev.02/>
>>
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20170103/719538c4/attachment.html>


More information about the compiler-dev mailing list