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

/proc/self/stat parsing in libmanagement broken by execname with spaces

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • None
    • core-svc
    • None

      Parsing "/proc/self/stat" by simply breaking the line on spaces will fall down if the executable name contains spaces.

      This is a problem in src/jdk.management/unix/native/libmanagement_ext/OperatingSystemImpl.c where the committed virtual memory size (shown by OperatingSystem MXBean) is extracted. An exec name with a space means we return the wrong value.

      UnixOperatingSystem.c / vread_statdata() does better, it uses strrchr() to find the last occurring ')'.

            kevinw Kevin Walls
            kevinw Kevin Walls
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: