RFR: JDK-8201591 JVM features with "-" in name is not correctly handled

Erik Joelsson erik.joelsson at oracle.com
Mon Apr 16 15:10:34 UTC 2018


Looks good.

/Erik


On 2018-04-16 05:07, Magnus Ihse Bursie wrote:
> JDK-8201483 caused a regression for enabling JVM features with a dash 
> in the name.
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8201591
> Patch inline:
> diff --git a/make/autoconf/hotspot.m4 b/make/autoconf/hotspot.m4
> --- a/make/autoconf/hotspot.m4
> +++ b/make/autoconf/hotspot.m4
> @@ -269,9 +269,9 @@
>      USER_JVM_FEATURE_LIST=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
>      AC_MSG_RESULT([$user_jvm_feature_list])
>      # These features will be added to all variant defaults
> -    JVM_FEATURES=`$ECHO $USER_JVM_FEATURE_LIST | $AWK '{ for (i=1; 
> i<=NF; i++) if (!match($i, /-.*/)) print $i }'`
> +    JVM_FEATURES=`$ECHO $USER_JVM_FEATURE_LIST | $AWK '{ for (i=1; 
> i<=NF; i++) if (!match($i, /^-.*/)) print $i }'`
>      # These features will be removed from all variant defaults
> -    DISABLED_JVM_FEATURES=`$ECHO $USER_JVM_FEATURE_LIST | $AWK '{ for 
> (i=1; i<=NF; i++) if (match($i, /-.*/)) print substr($i, 2) }'`
> +    DISABLED_JVM_FEATURES=`$ECHO $USER_JVM_FEATURE_LIST | $AWK '{ for 
> (i=1; i<=NF; i++) if (match($i, /^-.*/)) print substr($i, 2) }'`
>
>      # Verify that the user has provided valid features
>      BASIC_GET_NON_MATCHING_VALUES(INVALID_FEATURES, $JVM_FEATURES 
> $DISABLED_JVM_FEATURES, $VALID_JVM_FEATURES)
>
> /Magnus
>




More information about the build-dev mailing list