RFR(S) 8227868: jinfo and jstack can fail converting UTF8 output to strings

Severin Gehwolf sgehwolf at redhat.com
Thu Jul 18 14:54:58 UTC 2019


Hi Ralf,

On Thu, 2019-07-18 at 12:24 +0000, Schmelter, Ralf wrote:
> Hi Severin,
> 
> thanks for the review.
> 
> > If I read this right, then the method doesn't do what it claims it
> > does. It's printing to System.out unconditionally instead of to 'ps'.
> > What am I missing?
> 
> Nothing. The code should of course use ps and not System.out. I've updated the webrev:
> http://cr.openjdk.java.net/~rschmelter/webrevs/8227868/webrev.1/

Thanks.

> I'm not sure why additional tests would be needed, given that the existing ones already test the code.

I meant a test which reproduces the issue. It appears existing tests
don't expose the issue (as they are likely not using those characters).
Neither JDK-8222491 nor this fix includes a regression test. How would
we ensure this doesn't break in future? Is this a case of being hard to
reproduce?

Thanks,
Severin



More information about the serviceability-dev mailing list