[9] RFR (S): 8058846: c.o.j.t.Platform::isX86 and isX64 may simultaneously return true

Filipp Zhinkin filipp.zhinkin at oracle.com
Wed Nov 26 11:51:50 UTC 2014

Hi all,

please review a fix for 8058846.

The issue is that com.oracle.java.testlibrary.Platform::{isX86, isX64}
simultaneously return true on some platforms and as a result tests
whose behaviour is differs depending on Platform::{isX86, isX64} values
may fail.

Both methods verify that os.arch value starts from particular string.
In case of isX86 such string are "i386" and "x86",
in case of isX64 - "amd64" and "x86_64".
So if os.arch is X86_64. then both these methods will return true.

Platform::isArch was updated to use regexps instead of finding a substring
in os.arch's value and all ::is<arch name> methods were update to
reflect that change.

Also a new test was added to verify that all Platform's methods that should
be mutually exclusive are actually such.

Bug id: https://bugs.openjdk.java.net/browse/JDK-8058846
Webrev: http://cr.openjdk.java.net/~fzhinkin/8058846/webrev.00/
Testing: manual & automated


More information about the hotspot-compiler-dev mailing list