Request for reviews (XS): 7047069: Array can dynamically change size when assigned to an object field (original) (raw)
Tom Rodriguez tom.rodriguez at oracle.com
Fri May 27 13:15:04 PDT 2011
- Previous message: Request for reviews (XS): 7047069: Array can dynamically change size when assigned to an object field
- Next message: Request for reviews (XS): 7047069: Array can dynamically change size when assigned to an object field
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
That looks good.
tom
On May 27, 2011, at 12:47 PM, Vladimir Kozlov wrote:
Yes, removed BIGNEG and used -1 in findintcon()
Thanks, Vladimir Tom Rodriguez wrote: You don't really need BIGNEG at all then. tom On May 27, 2011, at 12:34 PM, Vladimir Kozlov wrote:
I agree, I changed the code to check result of findintcon(offset, BIGNEG). Webrev is updated.
Thanks, Vladimir Tom Rodriguez wrote: On May 27, 2011, at 11:51 AM, Vladimir Kozlov wrote: http://cr.openjdk.java.net/~kvn/7047069/webrev
Fixed 7047069: Array can dynamically change size when assigned to an object field I lost my faith in our testing :( This broken code was there for more then 3 years and nobody hit it? The initialization of a newly-allocated array with arraycopy is broken when src and dest offsets are not constants. The typo in the code convert not constant offsets to constant 8: 12 + (-1)*4. So we generates copy from offset 8 which is array length and overwrite it and the rest of the beginning of the array. I don't really like the findintcon idiom all that much and the usage here is too clever. It's much less clear than: if (srcoffset->Opcode() == OpConI || destoffset->Opcode() == OpConI) return; intptrt srcoff = abase + ((intptrt) srcoffset->findintcon() << scale);_ _intptrt destoff = abase + ((intptrt) destoffset->findintcon() << scale); Anyway, your fix is good. tom Added regression test.
- Previous message: Request for reviews (XS): 7047069: Array can dynamically change size when assigned to an object field
- Next message: Request for reviews (XS): 7047069: Array can dynamically change size when assigned to an object field
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the hotspot-compiler-dev mailing list