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

Improve error handling when specified dynamic archive doesn't exist

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 13
    • Fix Version/s: 14
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b25

      Description

      See http://hg.openjdk.java.net/jdk/jdk/file/d3382812b788/src/hotspot/share/memory/dynamicArchive.cpp#l1070

      Currently only a warning is printed. Should we be more strict and give an error instead?

      address DynamicArchive::map() {
        assert(UseSharedSpaces, "Sanity");

        // Create the dynamic archive map info
        FileMapInfo* mapinfo;
        const char* filename = Arguments::GetSharedDynamicArchivePath();
        struct stat st;
        address result;
        if ((filename != NULL) && (os::stat(filename, &st) == 0)) {
          mapinfo = new FileMapInfo(false);
          if (!mapinfo->open_for_read(filename)) {
            result = NULL;
          }
          result = map_impl(mapinfo);
          if (result == NULL) {
            map_failed(mapinfo);
            mapinfo->restore_shared_path_table();
          }
        } else {
          if (filename != NULL) {
            log_warning(cds, dynamic)("specified dynamic archive doesn't exist: %s", filename);
          }
          result = NULL;
        }
        return result;
      }

        Attachments

          Activity

            People

            • Assignee:
              iklam Ioi Lam
              Reporter:
              iklam Ioi Lam
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: