Need reviewer: a couple of hprof fixes for Parfait
Kelly Ohair
kelly.ohair at oracle.com
Tue Jun 12 08:04:21 PDT 2012
i am just trying to prevent the fd leak
i vaguely recall that connect() was not consistent on all os implementations
so makes me nervous to change that logic
Sent from my iPhone
On Jun 12, 2012, at 1:38, Dmitry Samersoff <Dmitry.Samersoff at oracle.com> wrote:
> Changes looks good for me.
>
> but logic below always was cryptic for me:
>
> 139 /* now try connecting */
> 140 if (-1 == connect(fd, (struct sockaddr*)&s, sizeof(s))) {
> 141 (void)close(fd);
> 142 return 0;
> 143 }
>
> we returns -1 if gethostbyname fail, but 0 if we can't connect to host.
>
> -Dmitry
>
> On 2012-06-12 06:48, Kelly O'Hair wrote:
>>
>> Need reviewer.
>>
>> I was asked to look at some Parfait errors in hprof code:
>>
>> 7176138: Fixes for missing close() calls and possible null pointer reference instead of fatal error
>> http://cr.openjdk.java.net/~ohair/openjdk8/parfait_hprof_fixes/webrev/
>>
>> -kto
>>
>
>
> --
> Dmitry Samersoff
> Java Hotspot development team, SPB04
> * There will come soft rains ...
More information about the serviceability-dev
mailing list