RFR(S): 8215792: AArch64: String.indexOf generates incorrect result
dmitrij.pochepko at bell-sw.com
Fri Jan 4 12:52:03 UTC 2019
I could miss something, so, need to try it. I'll send webrev with patch
once it's done.
On 04.01.2019 14:04, Pengfei Li (Arm Technology China) wrote:
> Hi Dmitrij,
> Thanks a lot for your reply.
>> since cnt2 is used as counter, wouldn't it be easier and shorter just to substract cnt1 from cnt2 at the beginning of this code. Total (cnt2 - cnt1 +1) combinations must be checked. That is why first sustraction is by (wordSize/str2_chr_size - 1).
>> Then whole fix will be probably just 1 line at the beginning: sub(cnt2, cnt2, cnt1);
> I don't think the whole fix could be as easy as "sub(cnt2, cnt2, cnt1)" because cnt2 is the counter which counts number of bytes not processed. It could be different from the number of bytes after current first-character-match index.
> But this is just my thought. Perhaps I didn't understand your idea and code thoroughly. So could you post your shorter fix and let's test if it's right?
More information about the hotspot-compiler-dev