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

ConstantPool::print_on can crash if _cache is NULL

XMLWordPrintable

    • b13

        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.

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

                Created:
                Updated:
                Resolved: