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

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

XMLWordPrintable

    • b28

        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.

              sviswanathan Sandhya Viswanathan
              sviswanathan Sandhya Viswanathan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: