RFR 8000203: file descriptor leak, src/solaris/native/java/net/net_util_md.c ... AND a potential realloc()-related memory leak.

2012-10-24 Thread John Zavgren

Greetings:

I'm requesting a review of a software change that fixes a file descriptor leak 
AND a potential memory leak that involves memory reallocation (realloc()). The 
webrev image is in the following location:

http://cr.openjdk.java.net/~chegar/8000203/webrev.01/

Thanks!
John Zavgren
john.zavg...@oracle.com


Re: RFR 8000203: file descriptor leak, src/solaris/native/java/net/net_util_md.c ... AND a potential realloc()-related memory leak.

2012-10-24 Thread Chris Hegarty

Looks good to me. Thanks for going the extra mile here.

-Chris.

On 24/10/2012 14:16, John Zavgren wrote:


Greetings:

I'm requesting a review of a software change that fixes a file descriptor leak 
AND a potential memory leak that involves memory reallocation (realloc()). The 
webrev image is in the following location:

http://cr.openjdk.java.net/~chegar/8000203/webrev.01/

Thanks!
John Zavgren
john.zavg...@oracle.com


Re: RFR 8000203: file descriptor leak, src/solaris/native/java/net/net_util_md.c ... AND a potential realloc()-related memory leak.

2012-10-24 Thread Dmitry Samersoff
John,

Looks good for me!

-Dmitry

On 2012-10-24 17:16, John Zavgren wrote:
> 
> Greetings:
> 
> I'm requesting a review of a software change that fixes a file descriptor 
> leak AND a potential memory leak that involves memory reallocation 
> (realloc()). The webrev image is in the following location:
> 
> http://cr.openjdk.java.net/~chegar/8000203/webrev.01/
> 
> Thanks!
> John Zavgren
> john.zavg...@oracle.com
> 


-- 
Dmitry Samersoff
Java Hotspot development team, SPB04
* There will come soft rains ...


hg: jdk8/tl/jdk: 8001466: Nightly regression test failure of SSLSocketSNISensitive.java

2012-10-24 Thread xuelei . fan
Changeset: e782f3c383fe
Author:xuelei
Date:  2012-10-24 08:25 -0700
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/e782f3c383fe

8001466: Nightly regression test failure of SSLSocketSNISensitive.java
Reviewed-by: weijun

! test/sun/security/ssl/javax/net/ssl/ServerName/SSLSocketSNISensitive.java



Re: RFR 8000203: file descriptor leak, src/solaris/native/java/net/net_util_md.c ... AND a potential realloc()-related memory leak.

2012-10-24 Thread Kurchi Hazra
Just for the sake of understanding the fix better, loRoutesTemp will 
point to 0 if the realloc() request fails,
and we still need a reference to the older allocated memory (loRoutes in 
this case) in order to free it. Hence

the need for a temporary variable here?

- Kurchi


On 24.10.2012 06:27, Chris Hegarty wrote:

Looks good to me. Thanks for going the extra mile here.

-Chris.

On 24/10/2012 14:16, John Zavgren wrote:


Greetings:

I'm requesting a review of a software change that fixes a file 
descriptor leak AND a potential memory leak that involves memory 
reallocation (realloc()). The webrev image is in the following location:


http://cr.openjdk.java.net/~chegar/8000203/webrev.01/

Thanks!
John Zavgren
john.zavg...@oracle.com


--
-Kurchi



Re: RFR 8000203: file descriptor leak, src/solaris/native/java/net/net_util_md.c ... AND a potential realloc()-related memory leak.

2012-10-24 Thread John Zavgren
That's right Kurchi. If realloc were to fail, in the original code, then the 
pointer: loRoutes would be set to the value zero, but the memory that this 
variable previously pointed to would still be allocated. So, basically, if 
realloc failed, then we'd leak memory.

John
- Original Message -
From: kurchi.subhra.ha...@oracle.com
To: john.zavg...@oracle.com
Cc: net-dev@openjdk.java.net
Sent: Wednesday, October 24, 2012 1:31:36 PM GMT -05:00 US/Canada Eastern
Subject: Re: RFR 8000203: file descriptor leak, 
src/solaris/native/java/net/net_util_md.c ... AND a potential realloc()-related 
memory leak.

Just for the sake of understanding the fix better, loRoutesTemp will 
point to 0 if the realloc() request fails,
and we still need a reference to the older allocated memory (loRoutes in 
this case) in order to free it. Hence
the need for a temporary variable here?

- Kurchi


On 24.10.2012 06:27, Chris Hegarty wrote:
> Looks good to me. Thanks for going the extra mile here.
>
> -Chris.
>
> On 24/10/2012 14:16, John Zavgren wrote:
>>
>> Greetings:
>>
>> I'm requesting a review of a software change that fixes a file 
>> descriptor leak AND a potential memory leak that involves memory 
>> reallocation (realloc()). The webrev image is in the following location:
>>
>> http://cr.openjdk.java.net/~chegar/8000203/webrev.01/
>>
>> Thanks!
>> John Zavgren
>> john.zavg...@oracle.com

-- 
-Kurchi



Re: RFR 8000203: file descriptor leak, src/solaris/native/java/net/net_util_md.c ... AND a potential realloc()-related memory leak.

2012-10-24 Thread Kurchi Hazra

Sounds good, thanks a lot.

- Kurchi


On 24.10.2012 10:47, John Zavgren wrote:

That's right Kurchi. If realloc were to fail, in the original code, then the 
pointer: loRoutes would be set to the value zero, but the memory that this 
variable previously pointed to would still be allocated. So, basically, if 
realloc failed, then we'd leak memory.

John
- Original Message -
From: kurchi.subhra.ha...@oracle.com
To: john.zavg...@oracle.com
Cc: net-dev@openjdk.java.net
Sent: Wednesday, October 24, 2012 1:31:36 PM GMT -05:00 US/Canada Eastern
Subject: Re: RFR 8000203: file descriptor leak, 
src/solaris/native/java/net/net_util_md.c ... AND a potential realloc()-related 
memory leak.

Just for the sake of understanding the fix better, loRoutesTemp will
point to 0 if the realloc() request fails,
and we still need a reference to the older allocated memory (loRoutes in
this case) in order to free it. Hence
the need for a temporary variable here?

- Kurchi


On 24.10.2012 06:27, Chris Hegarty wrote:

Looks good to me. Thanks for going the extra mile here.

-Chris.

On 24/10/2012 14:16, John Zavgren wrote:

Greetings:

I'm requesting a review of a software change that fixes a file
descriptor leak AND a potential memory leak that involves memory
reallocation (realloc()). The webrev image is in the following location:

http://cr.openjdk.java.net/~chegar/8000203/webrev.01/

Thanks!
John Zavgren
john.zavg...@oracle.com


--
-Kurchi



Re: RFR 8000203: file descriptor leak, src/solaris/native/java/net/net_util_md.c ... AND a potential realloc()-related memory leak.

2012-10-24 Thread Dmitry Samersoff
Kurchi.

On 2012-10-24 21:31, Kurchi Hazra wrote:
> Just for the sake of understanding the fix better, loRoutesTemp will
> point to 0 if the realloc() request fails,
> and we still need a reference to the older allocated memory (loRoutes in
> this case) in order to free it. Hence
> the need for a temporary variable here?

Correct.

realloc doesn't modify original pointer in case of file.

-Dmitry

> 
> - Kurchi
> 
> 
> On 24.10.2012 06:27, Chris Hegarty wrote:
>> Looks good to me. Thanks for going the extra mile here.
>>
>> -Chris.
>>
>> On 24/10/2012 14:16, John Zavgren wrote:
>>>
>>> Greetings:
>>>
>>> I'm requesting a review of a software change that fixes a file
>>> descriptor leak AND a potential memory leak that involves memory
>>> reallocation (realloc()). The webrev image is in the following location:
>>>
>>> http://cr.openjdk.java.net/~chegar/8000203/webrev.01/
>>>
>>> Thanks!
>>> John Zavgren
>>> john.zavg...@oracle.com
> 


-- 
Dmitry Samersoff
Java Hotspot development team, SPB04
* There will come soft rains ...


hg: jdk8/tl/jdk: 6976971: TEST: javax/management/remote/mandatory/URLTest.java should be re-integrated

2012-10-24 Thread alan . bateman
Changeset: 8e8fcd44b963
Author:jbachorik
Date:  2012-10-24 20:44 +0100
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/8e8fcd44b963

6976971: TEST: javax/management/remote/mandatory/URLTest.java should be 
re-integrated
Reviewed-by: alanb

! test/javax/management/remote/mandatory/URLTest.java



hg: jdk8/tl/jdk: 8000203: File descriptor leak in src/solaris/native/java/net/net_util_md.c

2012-10-24 Thread chris . hegarty
Changeset: 909676adaefd
Author:chegar
Date:  2012-10-24 21:20 +0100
URL:   http://hg.openjdk.java.net/jdk8/tl/jdk/rev/909676adaefd

8000203: File descriptor leak in src/solaris/native/java/net/net_util_md.c
Reviewed-by: dsamersoff, khazra, chegar
Contributed-by: John Zavgren 

! src/solaris/native/java/net/net_util_md.c