Skip to content
Permalink
Browse files
8263376: CTW (Shenandoah): assert(mems <= 1) failed: No node right af…
…ter call if multiple mem projections

Reviewed-by: kvn, chagedorn
  • Loading branch information
rwestrel committed Mar 26, 2021
1 parent 4e74de4 commit 33c94ffc8107170038dd798d656bd52e32406225
Showing 2 changed files with 30 additions and 6 deletions.
@@ -5042,7 +5042,8 @@ Node *PhaseIdealLoop::get_late_ctrl( Node *n, Node *early ) {
for (uint j = 1; j < s->req(); j++) {
Node* in = s->in(j);
Node* r_in = r->in(j);
if ((worklist.member(in) || in == mem) && is_dominator(early, r_in)) {
// We can't reach any node from a Phi because we don't enqueue Phi's uses above
if (((worklist.member(in) && !in->is_Phi()) || in == mem) && is_dominator(early, r_in)) {
LCA = dom_lca_for_get_late_ctrl(LCA, r_in, n);
}
}
@@ -23,7 +23,7 @@

/**
* @test
* @bug 8258393
* @bug 8258393 8263376
* @summary Shenandoah: "graph should be schedulable" assert failure
* @requires vm.flavor == "server"
* @requires vm.gc.Shenandoah
@@ -38,13 +38,17 @@ public static void main(String[] args) {
B b = new B();
C c = new C();
for (int i = 0; i < 20_000; i++) {
test(a);
test(b);
test(c);
test1(a);
test1(b);
test1(c);

test2(a, i);
test2(b, i);
test2(c, i);
}
}

private static Object test(A a) {
private static Object test1(A a) {
if (a.getClass() == A.class) {
}

@@ -58,6 +62,25 @@ private static Object test(A a) {
return o;
}

static int field;

private static Object test2(A a, int i) {
if (a.getClass() == A.class) {
}

Object o = null;
try {
a.m();
o = a.getClass();
} catch (Exception e) {
i = 42;
}
if (i == 42) {
field = 42;
}
return o;
}

private static class A {
void m() throws Exception {
throw new Exception();

1 comment on commit 33c94ff

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 33c94ff Mar 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.