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

Liam Miller-Cushon cushon at google.com
Thu Dec 15 01:16:21 UTC 2016


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/20161214/abf90f1b/attachment.html>


More information about the compiler-dev mailing list