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

use of & instead of && in LibraryCallKit::arraycopy_restore_alloc_state

    XMLWordPrintable

Details

    • b26

    Backports

      Description

        Jc Beyler discovered this issue in the opto/library_call.cpp.

        The fragment is:

        JVMState* LibraryCallKit::arraycopy_restore_alloc_state(AllocateArrayNode* alloc, int& saved_reexecute_sp) {
          if (alloc != NULL) {
            ciMethod* trap_method = alloc->jvms()->method();
            int trap_bci = alloc->jvms()->bci();

            if (!C->too_many_traps(trap_method, trap_bci, Deoptimization::Reason_intrinsic) &
                  !C->too_many_traps(trap_method, trap_bci, Deoptimization::Reason_null_check)) {
            . . .

        It seems, the bitwise operator '&' is used instead of the logical operator '&&'.

        Attachments

          Issue Links

            Activity

              People

                rraghavan Rahul Raghavan
                sspitsyn Serguei Spitsyn
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: