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

Potential infinite loop in macOS hotspot agent

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • 8u232, 11, 14
    • hotspot
    • b83
    • 8
    • b22
    • os_x

      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.

            stooke Simon Tooke
            stooke Simon Tooke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

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