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

os::getenv is inadequate

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • None
    • b64

        os::getenv takes a buffer, and returns false in two cases: 1) if there was no environment variable, and 2) if the environment variable didn't fit into the buffer.

        This makes it impossible to use this API to get the entire contents of the environment variable - you are limited to the length of the buffer.

        Straight getenv() itself is part of the C99 spec, and supported on all platforms for which we build Hotspot. The only platform we know that doesn't support it is WinRT, and Hotspot doesn't target WinRT.

              jmanson Jeremy Manson (Inactive)
              jmanson Jeremy Manson (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: