Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8266854

LibraryCallKit::inline_preconditions_checkIndex modifies control flow even if the intrinsic bailed out

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b28

      Backports

        Description

        LibraryCallKit::inline_preconditions_checkIndex can result in "# assert(ctrl == kit.control()) failed: Control flow was added although the intrinsic bailed out" sometimes.

        Consider the following code snippet:
         ...
         set_control(_gvn.transform(new IfTrueNode(rc)));
         {
           PreserveJVMState pjvms(this);
           set_control(_gvn.transform(new IfFalseNode(rc)));
           uncommon_trap(Deoptimization::Reason_range_check,
                         Deoptimization::Action_make_not_entrant);
         }
         ..
         Here the control is being modified by set_control even though a bailout is possible afterwards.

          Moving the set_control later in the intrinsic fixes this.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                sviswanathan Sandhya Viswanathan
                Reporter:
                sviswanathan Sandhya Viswanathan
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: