RFR (S): 8218939: vm/mlvm/anonloader/stress/byteMutation crashed on windows

David Holmes david.holmes at oracle.com
Fri Feb 15 01:32:09 UTC 2019


On 15/02/2019 11:25 am, Kim Barrett wrote:
>> On Feb 14, 2019, at 7:47 PM, David Holmes <david.holmes at oracle.com> wrote:
>>
>> Hi Kim,
>>
>> Thanks for looking at this.
>>
>> On 15/02/2019 9:51 am, Kim Barrett wrote:
>>>> - in formatting the exception message we used %s but instead we need %.*s and pass the length
>>> And this change to formatting works because we’re dealing with “Modified UTF-8”, which never has embedded NULs, right?
>>
>> I believe that is the case, but if not then %.*s will (from my reading of the C99 standard) stop writing when it hits the first NUL anyway.
> 
> Yes, I agree with that.
> 
>> So we could potentially print a partial name. is there a potential issue here I'm not seeing where %.*s could be worse than %s?
> 
> Depends on how bad it is to print a partial name.  In these contexts, perhaps annoying but not more than that.
> 
> Just making sure I understood what I was reviewing. :)

Okay. Note that as the name is somehow invalid utf8 anyway we could 
print all sorts of weird stuff.

Thanks,
David


More information about the hotspot-runtime-dev mailing list