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

Unreachable code in nmethod.cpp inside #ifdef DEBUG

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • 16, 17
    • hotspot
    • None
    • b16
    • 14
    • b19

      HotSpot doesn't define the DEBUG macro, so the assert assert_lock_strong call is not included even in a debug build.

      The code should be changed to #ifdef ASSERT instead.

      bool nmethod::try_transition(int new_state_int) {
        signed char new_state = new_state_int;
      #ifdef DEBUG
        if (new_state != unloaded) {
          assert_lock_strong(CompiledMethod_lock);
        }
      #endif

            rehn Robbin Ehn
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: