0.39.0: Insert branch around re performing store for awrtbar #17530
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In case of balanced GC policy, we generated code for awrtbar where in case of Non-NULL object stored into array object, it will re performing storing to avoid branching around which may have been cheaper. This re performing storing in the same object field twice for awrtbarrier somehow causing issue in unit test for PingPong using virtual threads where we end up with incorrect state in the array of ForkJoinTask causing one of the producer or consumer thread to be in waiting state. Change in this commit inserts the branch around the second store where we would jump to in case on runtime we encounter the null object store which can bypass costly write barrier checks.