RFR: 8308407: libjvm library not reproducibly comparable between vendors [v3]

Andrew Leonard aleonard at openjdk.org
Mon May 22 09:39:50 UTC 2023


On Fri, 19 May 2023 13:05:41 GMT, Andrew Leonard <aleonard at openjdk.org> wrote:

>> Andrew Leonard has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains one commit:
>> 
>>   8308407: libjvm library not reproducibly comparable between vendors
>>   
>>   Signed-off-by: Andrew Leonard <anleonar at redhat.com>
>
> Re-based due to upstream build break:

> > > @andrew-m-leonard is 64 chars sufficient for the most common values found in the `vm_vendor` string? Some indication that this covers the major vendors would make it a clearer win.
> > 
> > 
> > `sizeof(VENDOR) < VENDOR_PADDING ? VENDOR_PADDING : sizeof(VENDOR)` means it will always be at least `VENDOR_PADDING` but may be longer. An earlier revision - see [adoptium/jdk#17](https://github.com/adoptium/jdk/pull/17) - did start to impose a 64 character limit, but the patch was revised to avoid this.
> 
> If `sizeof(VENDOR)` on most distributions is >64 chars, then using 64 as a minimum provides no value. I have no idea what the typical length of this string is and I expect most reviewers only know the value their distribution uses. Confirming the common choices are less then 64 chars makes the reviewers lives easier as it affirms the value of the PR beyond its technical correctness.

@DanHeidinga @gnu-andrew @dholmes-ora Thank you for your reviews, much appreciated. For completeness, here are the vm_vendor strings (aka CompanyName, or --with-vendor-name configure arg), for some major vendors:

| Vendor | VM vendor string | Length |
| -----     | -----     | -----   |
| Eclipse Adoptium "Temurin" | "Eclipse Adoptium" | 16 |
| Red Hat | "Red Hat, Inc." | 13 |
| Oracle | "Oracle Corporation" | 18 |
| Azul | "Azul Systems, Inc." | 18 |
| Microsoft | "Microsoft" | 9  |
| IBM "Semeru"| "Eclipse OpenJ9" | 14 |
| SAP | "SAP SE" | 6 |
| Amazon "Corretto" | "Amazon.com Inc." | 15 |
| BellSoft "Liberica" | "BellSoft" | 8 |
| OpenJDK Reference Impl | "Oracle Corporation" | 18 |
 
As you can see, padding to 64bytes is easily sufficient for all.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14058#issuecomment-1556887962


More information about the hotspot-runtime-dev mailing list