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

configure should check that grep handles empty pattern correctly

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • None
    • infrastructure
    • None
    • b153
    • aix

      Grep is used in various places during configure to match a subset of strings against a superset of allowed words, for example in hotspot.m4:

      424 NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
      425 STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
      426 INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`

      grep, at least on AIX, does not handle -Fx correctly if the pattern list - whis is a list of newline-separated strings - contains empty pattern. This may very well happen because often spaces are converted to newlines, as in the example above, and multiple spaces become multiple newlines.

      So, grep should be checked at configure time for its ability to handle empty pattern correctly.

            stuefe Thomas Stuefe
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: