RFR (S): 8218939: vm/mlvm/anonloader/stress/byteMutation crashed on windows
Kim Barrett
kim.barrett at oracle.com
Fri Feb 15 01:25:57 UTC 2019
> 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. :)
More information about the hotspot-runtime-dev
mailing list