RFR: JDK-8196519: Incomplete classpath causes infinite recursion in Resolve.isAccessible

Liam Miller-Cushon cushon at google.com
Wed Mar 7 18:02:40 UTC 2018

Not a review, but it looks good to me. I verified the patch fixes the
original problem that led to the bug report, and I did not see any
compatibility impact in my testing.


On Wed, Mar 7, 2018 at 8:01 AM, Jan Lahoda <jan.lahoda at oracle.com> wrote:

> Hi,
> The problem here is that c.s.t.javac.code.Type.ErrorType.getEnclosingType
> returns "this", so if some code recursively analyses types and their
> enclosing types, it may get into trouble. In this case, it is
> Resolve.isAccessible which crashes with a StackOverflow.
> It would be possible to break the infinite recursion in isAccessible, but
> it seems as not quite correct to return "this" from getEnclosingType. The
> proposal is to return Type.noType.
> Bug: https://bugs.openjdk.java.net/browse/JDK-8196519
> Webrev: http://cr.openjdk.java.net/~jlahoda/8196519/webrev.00/
> How does this look?
> Thanks,
>     Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180307/0ddcc7c0/attachment.html>

More information about the compiler-dev mailing list