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

Missing ResourceMark in CDS and JVMTI code

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 21
    • hotspot
    • b23

      https://github.com/openjdk/jdk/blob/418a82551a2c58e43963beb5aa242a58bbd30e2f/src/hotspot/share/cds/filemap.cpp#L2556

      ClassFileStream* FileMapInfo::open_stream_for_jvmti(InstanceKlass* ik, Handle class_loader, TRAPS) {

      + ResourceMark rm(THREAD); // <-- is missing
        Symbol* name = ik->name();
        const char* const class_name = name->as_C_string();

      https://github.com/openjdk/jdk/blob/418a82551a2c58e43963beb5aa242a58bbd30e2f/src/hotspot/share/prims/jvmtiExport.cpp#L994

      + ResourceMark rm(THREAD); // <-- is missing.
          JvmtiClassFileLoadEventMark jem(_thread, _h_name, _class_loader,
                                          _h_protection_domain,
                                          _class_being_redefined);

      JvmtiClassFileLoadEventMark allocates resources in its constructor.

            ccheung Calvin Cheung
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: