RFR (S) 8009575 (2nd) - Reduce Symbol::_refcount from 4 bytes to 2 bytes
Ioi Lam
ioi.lam at oracle.com
Fri Jun 21 13:30:52 PDT 2013
Forgot to respond to this one:
On 06/21/2013 11:15 AM, Daniel D. Daugherty wrote:
> src/share/vm/oops/symbol.hpp
>
> line 132: size_t sz = heap_word_size(sizeof(SymbolBase) + (length
> > 0 ? length : 0));
> Assuming that 'length' can't be < 0, this is more clear:
>
> assert(length >= 0, "sanity check");
> size_t sz = heap_word_size(sizeof(SymbolBase) + length);
>
I am not sure if some valid code path would pass in length <=0 and
expect an empty symbol. This is unlikely, but since I am touch Symbol
which is widely used, I don't want to take any risks. I'd rather fix
this in another clean-up bug.
Thanks
- Ioi
More information about the hotspot-runtime-dev
mailing list