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

Dangling reference in ClassVerifier::verify_class

    XMLWordPrintable

Details

    • b26

    Backports

      Description

        SonarCloud reports:

        Address of stack memory associated with local variable 'method_signatures_table' is still referred to by the stack variable 'split_verifier' upon returning to the caller. This will be a dangling reference

        See:

        ```
        void ClassVerifier::verify_class(TRAPS) {
          ...
         
          // Create hash table containing method signatures.
          method_signatures_table_type method_signatures_table; // <--- stack-alloc
          set_method_signatures_table(&method_signatures_table); // <--- pointer assignment

        ...
          for (int index = 0; index < num_methods; index++) {
            // Check for recursive re-verification before each method.
            if (was_recursively_verified()) return; // <--- early return

        Attachments

          Issue Links

            Activity

              People

                hseigel Harold Seigel (Inactive)
                shade Aleksey Shipilev
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: