> This update fixes the test bug which was initially filed as a Valhalla bug 
> but then found to be NOT Valhalla specific.
> The static variable `objectCount` is used for two different purposes:
>  - to count current walked objects number
>  - as a number to tag objects
> 
> This leads to mismatches in indexes calculations.
> For instance the `ObjectFree` event callback decrements the `objectCount` 
> number. Then the `objectCountMax` can be smaller than some of the actual 
> indexes.
> The fix does:
>  - adds a fragment to force GC's with the JVMTI `ForceGarbageCollection` to 
> make the failure well reproducible
>  - split `objectCount` into: `objectCount` and `objectTagCount`
>  - `objectTagCount` is used to set the object tags and value of the 
> `objectCountMax`
>  - a couple of the `ind` boundary checks are also corrected
> 
> Testing:
>  - Executed the test locally: 
> `jvmti/IterateOverReachableObjects/iterreachobj002`
>  - TBD: Submit mach5 tiers 1-3 to be safe
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Serguei Spitsyn has updated the pull request with a new target base due to a 
merge or a rebase. The incremental webrev excludes the unrelated changes 
brought in by the merge/rebase. The pull request contains three additional 
commits since the last revision:

 - Merge
 - review: moved to the right place the line which sets the objectCountMax
 - 8384882: jvmti/IterateOverReachableObjects/iterreachobj002 fails with Not a 
valid malloc pointer

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/31585/files
  - new: https://git.openjdk.org/jdk/pull/31585/files/f597074d..1914ed7d

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=31585&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=31585&range=01-02

  Stats: 21385 lines in 676 files changed: 14776 ins; 3499 del; 3110 mod
  Patch: https://git.openjdk.org/jdk/pull/31585.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/31585/head:pull/31585

PR: https://git.openjdk.org/jdk/pull/31585

Reply via email to