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

ANSI-C Quoting bug in hotspot.m4 during configure on SLES 10 and 11

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • None
    • infrastructure
    • None
    • b120

    Description

      I've encountered a strange configure problem with the new hotspot build system on SLES 10 and 11:

      ...
      checking which variants of the JVM to build... server
      configure: Unknown variant(s) specified: server
      configure: error: The available JVM variants are: server client minimal core zero zeroshark custom
      configure exiting with result code 1
      ...

      The error seems nonsense since 'server' is a valid variant.
      For debugging purpose I ran "bash -vx configure ..." and this revealed:

      $GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"
      ++++ /usr/bin/grep -Fvx 'server$\nclient$\nminimal$\ncore$\nzero$\nzeroshark$\ncustom'
      +++ INVALID_VARIANTS=server

      The expected result would be:

      $GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"
      ++++ /bin/grep -Fvx 'server
      client
      minimal
      core
      zero
      zeroshark
      custom'
      +++ INVALID_VARIANTS=

      Apparently, the ANSI-C Quoting (see http://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html#ANSI_002dC-Quoting) for "${VALID_JVM_VARIANTS// /$'\n'}" went wrong. Instead of replacing Spaces by newlines, it wrongly replaced Spaces by $\n instead.

      I tried to find the specific problem without success. There exist several bugs about ANSI-C Quoting in bash. I could reproduce the problem on SLES 10.3 with the builtin bash 3.1.17 and a self-built bash 4.3.0 and also on a SLES 11.3 with the builtin bash 3.2.51. It worked on a newer SLES 12.1 with bash 4.2.47. I couldn't reproduce the problem on RHEL, Ubuntu and Fedora.

      Attachments

        Issue Links

          Activity

            People

              simonis Volker Simonis
              simonis Volker Simonis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: