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

Potential infinite loop in macOS hotspot agent

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8u232, 11, 14
    • Fix Version/s: 14
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Introduced In Build:
      b83
    • Introduced In Version:
      8
    • Resolved In Build:
      b22
    • OS:
      os_x

      Description

      Unfortunately I couldn't find a way to trigger this code, but a simple inspection reveals that if it ever got called it could not complete:

      {
            char* dyldpath = getenv("DYLD_LIBRARY_PATH");
            char* dypath = strtok(dyldpath, ":");
            while (dypath != NULL) {
              strcpy(filepath, dypath);
              strcat(filepath, filename);
              if (exists(filepath)) {
                 strcpy(rpath, filepath);
                 return true;
              }
              dypath = strtok(dyldpath, ":");
            }

      This code has been in since support for macOS core files was introduced, and survived this long so it's unlikely it was ever executed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stooke Simon Tooke
                Reporter:
                stooke Simon Tooke
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 1 hour
                  1h
                  Remaining:
                  Remaining Estimate - 1 hour
                  1h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified