[9] RFR(S) 8059299: assert(adr_type != NULL) failed: expecting TypeKlassPtr

John Rose john.r.rose at oracle.com
Thu Oct 2 06:06:39 UTC 2014

On Oct 1, 2014, at 9:05 PM, Vladimir Kozlov <vladimir.kozlov at oracle.com> wrote:

> http://cr.openjdk.java.net/~kvn/8059299/webrev/
> https://bugs.openjdk.java.net/browse/JDK-8059299
> Code in Parse::catch_inline_exceptions() incorrectly assumed that all paths reach the merge point in next code:
>        catch (Exception e) {
>            if (e instanceof Exception1) {
>                counter1++;
>            } else if (e instanceof Exception2) {
>                counter2++;
>            }
>            counter++;
>            throw e;
>        }
> But we generate an uncommon trap when profiling information matches checked exception (in the bug case Exception2, which is the only thrown exception).
> The fix is to use top() for dead paths when initializing Phi node of exceptions klasses. Also did code style clean up in surrounding code.
> Added new regression test.


I suggest adding a check at the end, that the counters have their expected values, to add more certainty that the test is doing what it appears to be doing.  (You could add another counter0++ before throw new Exception2() and check against that.)

— John

More information about the hotspot-compiler-dev mailing list