RFR 8037274 : sun.tools.attach.WindowsVirtualMachine#createPipe() needs more descriptive message when pipe creation fails

Jaroslav Bachorik jaroslav.bachorik at oracle.com
Fri Mar 14 15:43:49 UTC 2014


On 14.3.2014 16:40, Daniel D. Daugherty wrote:
> On 3/14/14 9:28 AM, Alan Bateman wrote:
>> On 14/03/2014 15:21, Jaroslav Bachorik wrote:
>>>
>>> Like this?
>>> http://cr.openjdk.java.net/~jbachorik/8037274/webrev.03
>> This looks okay and I assume you've tested this to ensure that the
>> exception has the message. A minor comment is that we prefer snprintf
>> over sprintf but the buffer is very over sized here so not an issue.
>>
>> -Alan
>
> I think some of the static security analysis tools will flag use of
> sprintf() as something that needs to be investigated. Probablybetter
> to switch to snprintf() to avoid false reports.
>
> Dan
>
> P.S.
> I _think_ parfait is smart enough not to do this but other
> static analysis tools may not be.

Ok. I will change it to snprintf(). Anyway, it is better to have it the 
way it is usually done.

-JB-


More information about the serviceability-dev mailing list