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

Liam Miller-Cushon cushon at google.com
Thu Dec 15 18:11:12 UTC 2016

Done: http://cr.openjdk.java.net/~cushon/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/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20161215/96a46048/attachment.html>

More information about the compiler-dev mailing list