Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8082879 | emb-9 | Goetz Lindenmaier | P4 | Resolved | Fixed | team |
split_if() in IfNode reasons about the region of ConstraintCasts (ifnode.cpp:149). This fails
if the region is NULL.
We see this happen with a CastPP node created in load_String_value / cast_array_to_stable. It is created without a region. The node is subject to optimizations and ends up with a Phi as in[1]. Still no region is needed for the node.
The fix is to check for NULL before accessing in[0] of the ConstraintCast. If in[0] == NULL the fix returns NULL to deny splitting the if. As I understand, the CastPP would be fine for split_if, but this seems to be a rare case and I do not have a test case for the good case. The error case denies the optimization one step later anyways.
if the region is NULL.
We see this happen with a CastPP node created in load_String_value / cast_array_to_stable. It is created without a region. The node is subject to optimizations and ends up with a Phi as in[1]. Still no region is needed for the node.
The fix is to check for NULL before accessing in[0] of the ConstraintCast. If in[0] == NULL the fix returns NULL to deny splitting the if. As I understand, the CastPP would be fine for split_if, but this seems to be a rare case and I do not have a test case for the good case. The error case denies the optimization one step later anyways.
- backported by
-
JDK-8082879 split_if accesses NULL region of ConstraintCast
-
- Resolved
-