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

Incorrect use of os::lasterror in ClassListParser

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • 11, 12
    • hotspot
    • None
    • b03
    • generic
    • generic

        _file = fopen(file, "r");
        _line_no = 0;
        _interfaces = new (ResourceObj::C_HEAP, mtClass) GrowableArray<int>(10, true);

        if (_file == NULL) {
          char errmsg[JVM_MAXPATHLEN];
          os::lasterror(errmsg, JVM_MAXPATHLEN);
          vm_exit_during_initialization("Loading classlist failed", errmsg);
        }

      'errno' from the fopen may have been overwritten inside the allocation logic (particularly if logging is enabled) by the time we call os::lasterror.

            pchilanomate Patricio Chilano Mateo
            pchilanomate Patricio Chilano Mateo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: