-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b52
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8082879 | emb-9 | Goetz Lindenmaier | P4 | Resolved | Fixed | team |
JDK-8356841 | openjdk8u462 | Roland Westrelin | P4 | Resolved | Fixed | b03 |
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
-
-
JDK-8356841 split_if accesses NULL region of ConstraintCast
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk8u-dev/eca7a305
-
Review(master) openjdk/jdk8u-dev/649