On 02/05/2015 12:47 PM, Paul Sandoz wrote:
On Feb 5, 2015, at 8:00 PM, Xueming Shen<[email protected]> wrote:
Hi,
Please help review the fix for #8030179
issue: https://bugs.openjdk.java.net/browse/JDK-8030179
webrev: http://cr.openjdk.java.net/~sherman/8030179/webrev
This is the regression bug introduced in jdk7 when trying to optimize the single
byte encoding loop, in which the "optimization" code inappropriately updates the
"sl" (source limit) value and triggers misbehavior of the sgp parser (in which
it
mistakenly returns "underflow" when it sees a high surrogate but can't see the
next
low surrogate, because the "sl" is changed...)
The fix looks good, but i would like to suggest some changes to the test.
We can use TestNG to avoid pulling in a bunch of infrastructure methods.
The test cases can be produced by a data provider and we can do a cross product
with char sets and character input (for example i have managed to induced stack
overflows by just passing sequences of high surrogates).
Using the data provider allows the test infrastrcture to report/crunch those
tests individually rather than being reported via System.out.
I can send a patch to the test if that helps.
That will be appreciated :-)
Thanks!
Sherman