RFR 8229539: [lworld] Incorrect result of sorting test with -XX:ValueArrayElemMaxFlatSize=0
david.simms at oracle.com
Thu Aug 29 14:46:36 UTC 2019
"ObjArrayKlass::copy_array()" had implemented it's own copy logic just
so it could enforce "null-free" array copy (which happens in
ObjArrayKlass when flattening is disabled). There was bug in the copy
code for *conjoint overlapping copies* (i.e. broke System.arraycopy()).
Rather than "fix" the logic, I removed it completely, and with Erik
Österlund's help added a new decorator to the Access API:
"ARRAYCOPY_NOTNULL" (pushing down the null check into the existing API,
reduce the amount of "special code", or simply duplicated code).
I did note that the same bug exists for valueArrayKlass, this is now
fixed as part of the patch. Said fix is temporary though, in that we
should start moving to using the Access API for value stores. I limited
the scope of this patch to the immediate bug fix.
Whilst adding some new tests, I noted some really old code use
"_WithField" and various javac compiler flags that are no longer
required. So I took the opportunity to clean out some of those.
More information about the valhalla-dev