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

os::getenv is inadequate

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      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

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

                  Dates

                  Created:
                  Updated:
                  Resolved: