RFR: 8366196: Crash in AbstractMethodCheck.getMethodCheckFailure
Maurizio Cimadamore
mcimadamore at openjdk.org
Mon Nov 3 10:06:23 UTC 2025
On Thu, 30 Oct 2025 16:47:56 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
> `AttrRecover` invokes `Attr.checkMethod` with a cached `CheckContext`. `checkMethod` may be calling `report` on the `CheckContext`:
> https://github.com/openjdk/jdk/blob/ed36b9bb6f3d429db6accfb3b096e50e7f2217ff/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java#L4986
>
> This fails if the cached `CheckContext` is a `MethodCheckContext`, whose `report` method throws.
>
> The proposal herein is to not delegate to the cached `CheckContext`'s `report` method, but rather always report the error using `Check.basicHandler`.
Looks good!
-------------
Marked as reviewed by mcimadamore (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/28066#pullrequestreview-3410277978
More information about the compiler-dev
mailing list