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

ConstantPool::print_on can crash if _cache is NULL

    XMLWordPrintable

Details

    • b13

    Backports

      Description

        ConstantPool::print_on does:

         st->print_cr(" - resolved_references: " INTPTR_FORMAT, p2i(resolved_references()));

        but resolved_references() does:

        return (objArrayOop)_cache->resolved_references();

        which will crash is _cache is NULL.

        print_on should be using resolved_references_or_null().

        It would also be useful for print_on to report the CP length before starting to iterate the contents.

        Attachments

          Issue Links

            Activity

              People

                dholmes David Holmes
                dholmes David Holmes
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: