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

os::getenv is inadequate

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P3
    • Resolution: Fixed
    • 9
    • 9
    • hotspot
    • None
    • b64

    Backports

      Description

        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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: