RFR(xxs): 8172579: 8168503 broke AIX build
Volker Simonis
volker.simonis at gmail.com
Wed Jan 11 17:51:55 UTC 2017
Hi Thomas,
why not simply using GNU grep? We already insist for so many other tools on
the GNU version that this wouldn't be a big thing.
And as far as I remember, GNU grep is already installed on most of our
machines anyway. You just have to place /opt/freeware/bin in front of your
PATH.
Your fix is actually also fine, although it breaks the informal code
formatting rules, which require the indentation of wrapped strings. But it
is also quite sensitive and I'm sure this will break again in the future
(in this or in other places).
By the way, why does it break for 'cds' if it didn't for 'jvmci'? I didn't
knew that we support 'cds' on AIX either?
Regards,
Volker
Thomas Stüfe <thomas.stuefe at gmail.com> schrieb am Mi., 11. Jan. 2017 um
16:09:
> Dear all,
>
>
>
> please take a look at this tiny fix:
>
>
>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8172579
>
> Webrev:
>
>
> http://cr.openjdk.java.net/~stuefe/webrevs/8172579-colon-8168503-broke-AIX-build/webrev/common/autoconf/hotspot.m4.udiff.html
>
>
>
> JDK-8168503 exposed a bug in AIX grep. AIX grep, when called like this:
>
> "grep -Fx <patternlist>" is unable to handle empty patterns correctly.
>
> 8168503 added a line break in the definition of a variable:
>
>
>
> VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti
>
> jvmci \
>
> - graal fprof vm-structs jni-check services management all-gcs nmt cds
>
> static-build aot"
>
> + graal fprof vm-structs jni-check services management all-gcs nmt cds \
>
>
>
> + static-build link-time-opt aot"
>
>
>
>
>
> So now, "cds" is followed by multiple spaces, which are later expanded to
>
> multiple newlines, and grep is unable to match the pattern immediately
>
> preceding these newlines (in this case, "cds"). This causes the
>
> HOTSPOT_VALIDATE_JVM_FEATURES
>
> function to fail with "Invalid JVM feature: cds".
>
>
>
> The error would also happened before when trying to match "jvmci", but so
>
> far we do not build jvmci on powerpc.
>
>
>
> The workaround for now is just to remove the superfluous spaces.
>
>
>
> I tried for some hours to find a better solution but could not find one
>
> which was small enough and worked on all platforms.
>
>
>
> I tried using sed to change multiple spaces to a single space, but did not
>
> get it to work correctly on AIX either.
>
>
>
> I thought about passing the pattern list as file to grep - which opposed to
>
> passing the pattern in the command line works as expected - but refrained
>
> from this because creating temporary files is error prone.
>
>
>
> I attempted to change the whole NEEDLE/STACK expression to a loop checking
>
> each single feature with '=~' against the list of valid features, but this
>
> felt too intrusive.
>
>
>
> The proposed fix is not the most elegant one but the risk for other
>
> platforms is minimal and it works.
>
>
>
> Kind Regards, Thomas
>
>
More information about the build-dev
mailing list