On Wed, 27 Aug 2025 01:19:17 GMT, David Beaumont <[email protected]> wrote:

> Changes jimage creation to sort any non-empty packages first in the list of 
> package entries.
> 
> Changes imageFile.cpp to read only the lowest bit in the flag word so that 
> other bits can later be used for preview mode.
> 
> Reviewer notes:
> ----
> Unfortunately I cannot be 100% sure that this change has covered all the 
> cases where the flag word is read. I only found imageFile.cpp looking at it, 
> and all the other jimage tools I know about, such as ImageReader, ignore it 
> completely.
> 
> The PR is "safe" in the sense that the value being written to the flag word 
> is unchanged, and the response in imageFile.cpp to a value is unchanged. 
> However getting this PR in does not guarantee there is no more code that does 
> a zero/non-zero test on the flag word.
> 
> To check this as best as I can heuristically, I ran a version of the code 
> through CI where the flag value was OR'ed with 0x80000000, meaning it was 
> never zero. If other code were doing a simple zero/non-zero test on the flag 
> it is hoped the this would catch it out.
> 
> I have also left any code which iterates the package entries alone (for now) 
> because they might be given older jimage files. In order to usefully process 
> the knowledge that "if there's a non-empty package it's listed first", it 
> might be necessary to make a minor bump to the version number of the file 
> jimage file so this feature can be detected.
> 
> ---------
> ### Progress
> - [x] Change must not contain extraneous whitespace
> 
> ### Error
> &nbsp;⚠️ The pull request body must not be empty.
> 
> 
> 
> ### Reviewing
> <details><summary>Using <code>git</code></summary>
> 
> Checkout this PR locally: \
> `$ git fetch https://git.openjdk.org/valhalla.git pull/1534/head:pull/1534` \
> `$ git checkout pull/1534`
> 
> Update a local copy of the PR: \
> `$ git checkout pull/1534` \
> `$ git pull https://git.openjdk.org/valhalla.git pull/1534/head`
> 
> </details>
> <details><summary>Using Skara CLI tools</summary>
> 
> Checkout this PR locally: \
> `$ git pr checkout 1534`
> 
> View PR using the GUI difftool: \
> `$ git pr show -t 1534`
> 
> </details>
> <details><summary>Using diff file</summary>
> 
> Download this PR as a diff file: \
> <a 
> href="https://git.openjdk.org/valhalla/pull/1534.diff";>https://git.openjdk.org/valhalla/pull/1534.diff</a>
> 
> </details>

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.org/valhalla/pull/1534

Reply via email to