Re: RFR-JDK8012108
On 25/04/2013 17:50, John Zavgren wrote: Greetings: I've cleaned up some formatting nits and a leak that I created in my realloc() repairs and created a revised webrev image: http://cr.openjdk.java.net/~jzavgren/8012108/webrev.04 Looks fine to me. Unless there are any other comments I'll sponsor this for you. -Chris. John On 04/24/2013 09:10 PM, John Zavgren wrote: All: I expanded the scope of the work for this bug and cleaned up other realloc() errors in the windows native code. I believe I've identified all unsafe calls to realloc() in this corner of the native code. Two additional files were affected. Please let me know what you think: http://cr.openjdk.java.net/~jzavgren/8012108/webrev.03/ http://cr.openjdk.java.net/%7Ejzavgren/8012108/webrev.03/ Thanks! John On 04/20/2013 10:36 AM, Kurchi Subhra Hazra wrote: On Apr 20, 2013, at 4:40 AM, Dmitry Samersoffdmitry.samers...@oracle.com wrote: Kurchi, if *netaddrPP == NULL at 367 and calloc fails at 391 we would jump to freeAllocatedMemory with start == NULL True, but then we skip to line 444 since *netaddrPP == NULL, so we don't get to line 438. I am just saying it is not strictly necessary to check if start is null before entering the first if block. We might want to guard against how the code changes in future and put in the check though. I have no ideas whether this code path is possible in reality or not, but it stops my eyes. -Dmitry On 2013-04-20 14:55, Kurchi Subhra Hazra wrote: On Apr 20, 2013, at 3:16 AM, Dmitry Samersoffdmitry.samers...@oracle.com wrote: John, 102, 145 else is redundant. 438 - we will crash here if start is null Maybe it is good to have an additional check for start != null, but from what I see, start will not be null if *netaddrPP is not null. -Dmitry On 2013-04-20 01:33, John Zavgren wrote: Greetings: I fixed the bad realloc pattern. Please let me know what you think. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.02/ Thanks! John Z - Original Message - From:chris.hega...@oracle.com To:net-dev@openjdk.java.net,john.zavg...@oracle.com Cc:dmitry.samers...@oracle.com Sent: Friday, April 19, 2013 8:59:25 AM GMT -05:00 US/Canada Eastern Subject: Re: RFR-JDK8012108 On 18/04/2013 22:11, Dmitry Samersoff wrote: John, I see bad realloc pattern here. Could you fix it as well? Yes, please. Otherwise the changes look fine. -Chris. e.g. 93 adapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); -Dmitry On 2013-04-19 00:56, John Zavgren wrote: Greetings: I fixed a case in the windows native code where calloc() was being used without checking it's returned value. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.01/ Thanks! John Zavgren -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer -- John Zavgren john.zavg...@oracle.com 603-821-0904 US-Burlington-MA -- John Zavgren john.zavg...@oracle.com 603-821-0904 US-Burlington-MA
Re: RFR-JDK8012108
Looks fine, just a few minor nits 1) unnecessary else L102 of the new file. 2) commented else L145 of the new file. 3) strange indentation L368 - 171 ( new file ) -Chris. On 19/04/2013 22:33, John Zavgren wrote: Greetings: I fixed the bad realloc pattern. Please let me know what you think. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.02/ Thanks! John Z - Original Message - From: chris.hega...@oracle.com To: net-dev@openjdk.java.net, john.zavg...@oracle.com Cc: dmitry.samers...@oracle.com Sent: Friday, April 19, 2013 8:59:25 AM GMT -05:00 US/Canada Eastern Subject: Re: RFR-JDK8012108 On 18/04/2013 22:11, Dmitry Samersoff wrote: John, I see bad realloc pattern here. Could you fix it as well? Yes, please. Otherwise the changes look fine. -Chris. e.g. 93 adapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); -Dmitry On 2013-04-19 00:56, John Zavgren wrote: Greetings: I fixed a case in the windows native code where calloc() was being used without checking it's returned value. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.01/ Thanks! John Zavgren
Re: RFR-JDK8012108
John, Looks good for me besides some nits: NetworkInterface.c: 132,208,405: better rearrange if and get rid of extra else 151: occasional space changes 162: //else comment seems redundant for me 408: missed free(tableP) NetworkInterface_winXP.c: 103: else is redundant 141: { bracket misplaced 146: //else comment seems redundant for me ResolverConfigurationImpl.c: 130: better rearrange if and get rid of extra else free(adapterP) missed -Dmitry On 2013-04-25 05:10, John Zavgren wrote: All: I expanded the scope of the work for this bug and cleaned up other realloc() errors in the windows native code. I believe I've identified all unsafe calls to realloc() in this corner of the native code. Two additional files were affected. Please let me know what you think: http://cr.openjdk.java.net/~jzavgren/8012108/webrev.03/ http://cr.openjdk.java.net/%7Ejzavgren/8012108/webrev.03/ Thanks! John On 04/20/2013 10:36 AM, Kurchi Subhra Hazra wrote: On Apr 20, 2013, at 4:40 AM, Dmitry Samersoff dmitry.samers...@oracle.com wrote: Kurchi, if *netaddrPP == NULL at 367 and calloc fails at 391 we would jump to freeAllocatedMemory with start == NULL True, but then we skip to line 444 since *netaddrPP == NULL, so we don't get to line 438. I am just saying it is not strictly necessary to check if start is null before entering the first if block. We might want to guard against how the code changes in future and put in the check though. I have no ideas whether this code path is possible in reality or not, but it stops my eyes. -Dmitry On 2013-04-20 14:55, Kurchi Subhra Hazra wrote: On Apr 20, 2013, at 3:16 AM, Dmitry Samersoff dmitry.samers...@oracle.com wrote: John, 102, 145 else is redundant. 438 - we will crash here if start is null Maybe it is good to have an additional check for start != null, but from what I see, start will not be null if *netaddrPP is not null. -Dmitry On 2013-04-20 01:33, John Zavgren wrote: Greetings: I fixed the bad realloc pattern. Please let me know what you think. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.02/ Thanks! John Z - Original Message - From: chris.hega...@oracle.com To: net-dev@openjdk.java.net, john.zavg...@oracle.com Cc: dmitry.samers...@oracle.com Sent: Friday, April 19, 2013 8:59:25 AM GMT -05:00 US/Canada Eastern Subject: Re: RFR-JDK8012108 On 18/04/2013 22:11, Dmitry Samersoff wrote: John, I see bad realloc pattern here. Could you fix it as well? Yes, please. Otherwise the changes look fine. -Chris. e.g. 93 adapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); -Dmitry On 2013-04-19 00:56, John Zavgren wrote: Greetings: I fixed a case in the windows native code where calloc() was being used without checking it's returned value. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.01/ Thanks! John Zavgren -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer -- John Zavgren john.zavg...@oracle.com 603-821-0904 US-Burlington-MA -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer
Re: RFR-JDK8012108
Greetings: I've cleaned up some formatting nits and a leak that I created in my realloc() repairs and created a revised webrev image: http://cr.openjdk.java.net/~jzavgren/8012108/webrev.04 John On 04/24/2013 09:10 PM, John Zavgren wrote: All: I expanded the scope of the work for this bug and cleaned up other realloc() errors in the windows native code. I believe I've identified all unsafe calls to realloc() in this corner of the native code. Two additional files were affected. Please let me know what you think: http://cr.openjdk.java.net/~jzavgren/8012108/webrev.03/ http://cr.openjdk.java.net/%7Ejzavgren/8012108/webrev.03/ Thanks! John On 04/20/2013 10:36 AM, Kurchi Subhra Hazra wrote: On Apr 20, 2013, at 4:40 AM, Dmitry Samersoffdmitry.samers...@oracle.com wrote: Kurchi, if *netaddrPP == NULL at 367 and calloc fails at 391 we would jump to freeAllocatedMemory with start == NULL True, but then we skip to line 444 since *netaddrPP == NULL, so we don't get to line 438. I am just saying it is not strictly necessary to check if start is null before entering the first if block. We might want to guard against how the code changes in future and put in the check though. I have no ideas whether this code path is possible in reality or not, but it stops my eyes. -Dmitry On 2013-04-20 14:55, Kurchi Subhra Hazra wrote: On Apr 20, 2013, at 3:16 AM, Dmitry Samersoffdmitry.samers...@oracle.com wrote: John, 102, 145 else is redundant. 438 - we will crash here if start is null Maybe it is good to have an additional check for start != null, but from what I see, start will not be null if *netaddrPP is not null. -Dmitry On 2013-04-20 01:33, John Zavgren wrote: Greetings: I fixed the bad realloc pattern. Please let me know what you think. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.02/ Thanks! John Z - Original Message - From:chris.hega...@oracle.com To:net-dev@openjdk.java.net,john.zavg...@oracle.com Cc:dmitry.samers...@oracle.com Sent: Friday, April 19, 2013 8:59:25 AM GMT -05:00 US/Canada Eastern Subject: Re: RFR-JDK8012108 On 18/04/2013 22:11, Dmitry Samersoff wrote: John, I see bad realloc pattern here. Could you fix it as well? Yes, please. Otherwise the changes look fine. -Chris. e.g. 93 adapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); -Dmitry On 2013-04-19 00:56, John Zavgren wrote: Greetings: I fixed a case in the windows native code where calloc() was being used without checking it's returned value. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.01/ Thanks! John Zavgren -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer -- John Zavgren john.zavg...@oracle.com 603-821-0904 US-Burlington-MA -- John Zavgren john.zavg...@oracle.com 603-821-0904 US-Burlington-MA
Re: RFR-JDK8012108
Dmitry: Thanks for your comments From my reading of the code for the procedure: getAddrsFromAdapter(...): If *netaddrPP == NULL at line 369, and a jump is made to freeAllocatedMemory because of a calloc() failure, then obviously the assignment operation on line 429 (*netaddrPP = start) is skipped, and *netaddrPP remains NULL... and consequently the block: if (*netaddrPP != NULL) { // We started with an existing list curr=start-next; start-next = NULL; start = curr; } is not executed (and no references are made to start-next). On the other hand, if *netaddrPP == NULL at line 369 and no errors occur, we make the assignment: *netaddrPP = start at line 429 and return immediately (without considering start-next). If you see any errors in my thinking, please let me know. Thanks! John On 04/20/2013 07:40 AM, Dmitry Samersoff wrote: Kurchi, if *netaddrPP == NULL at 367 and calloc fails at 391 we would jump to freeAllocatedMemory with start == NULL I have no ideas whether this code path is possible in reality or not, but it stops my eyes. -Dmitry On 2013-04-20 14:55, Kurchi Subhra Hazra wrote: On Apr 20, 2013, at 3:16 AM, Dmitry Samersoff dmitry.samers...@oracle.com wrote: John, 102, 145 else is redundant. 438 - we will crash here if start is null Maybe it is good to have an additional check for start != null, but from what I see, start will not be null if *netaddrPP is not null. -Dmitry On 2013-04-20 01:33, John Zavgren wrote: Greetings: I fixed the bad realloc pattern. Please let me know what you think. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.02/ Thanks! John Z - Original Message - From: chris.hega...@oracle.com To: net-dev@openjdk.java.net, john.zavg...@oracle.com Cc: dmitry.samers...@oracle.com Sent: Friday, April 19, 2013 8:59:25 AM GMT -05:00 US/Canada Eastern Subject: Re: RFR-JDK8012108 On 18/04/2013 22:11, Dmitry Samersoff wrote: John, I see bad realloc pattern here. Could you fix it as well? Yes, please. Otherwise the changes look fine. -Chris. e.g. 93 adapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); -Dmitry On 2013-04-19 00:56, John Zavgren wrote: Greetings: I fixed a case in the windows native code where calloc() was being used without checking it's returned value. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.01/ Thanks! John Zavgren -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer -- John Zavgren john.zavg...@oracle.com 603-821-0904 US-Burlington-MA
Re: RFR-JDK8012108
John, OK. Thank you for the explanation. It looks like i misread the code. -Dmitry On 2013-04-24 19:35, John Zavgren wrote: Dmitry: Thanks for your comments From my reading of the code for the procedure: getAddrsFromAdapter(...): If *netaddrPP == NULL at line 369, and a jump is made to freeAllocatedMemory because of a calloc() failure, then obviously the assignment operation on line 429 (*netaddrPP = start) is skipped, and *netaddrPP remains NULL... and consequently the block: if (*netaddrPP != NULL) { // We started with an existing list curr=start-next; start-next = NULL; start = curr; } is not executed (and no references are made to start-next). On the other hand, if *netaddrPP == NULL at line 369 and no errors occur, we make the assignment: *netaddrPP = start at line 429 and return immediately (without considering start-next). If you see any errors in my thinking, please let me know. Thanks! John On 04/20/2013 07:40 AM, Dmitry Samersoff wrote: Kurchi, if *netaddrPP == NULL at 367 and calloc fails at 391 we would jump to freeAllocatedMemory with start == NULL I have no ideas whether this code path is possible in reality or not, but it stops my eyes. -Dmitry On 2013-04-20 14:55, Kurchi Subhra Hazra wrote: On Apr 20, 2013, at 3:16 AM, Dmitry Samersoff dmitry.samers...@oracle.com wrote: John, 102, 145 else is redundant. 438 - we will crash here if start is null Maybe it is good to have an additional check for start != null, but from what I see, start will not be null if *netaddrPP is not null. -Dmitry On 2013-04-20 01:33, John Zavgren wrote: Greetings: I fixed the bad realloc pattern. Please let me know what you think. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.02/ Thanks! John Z - Original Message - From: chris.hega...@oracle.com To: net-dev@openjdk.java.net, john.zavg...@oracle.com Cc: dmitry.samers...@oracle.com Sent: Friday, April 19, 2013 8:59:25 AM GMT -05:00 US/Canada Eastern Subject: Re: RFR-JDK8012108 On 18/04/2013 22:11, Dmitry Samersoff wrote: John, I see bad realloc pattern here. Could you fix it as well? Yes, please. Otherwise the changes look fine. -Chris. e.g. 93 adapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); -Dmitry On 2013-04-19 00:56, John Zavgren wrote: Greetings: I fixed a case in the windows native code where calloc() was being used without checking it's returned value. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.01/ Thanks! John Zavgren -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer
Re: RFR-JDK8012108
All: I expanded the scope of the work for this bug and cleaned up other realloc() errors in the windows native code. I believe I've identified all unsafe calls to realloc() in this corner of the native code. Two additional files were affected. Please let me know what you think: http://cr.openjdk.java.net/~jzavgren/8012108/webrev.03/ http://cr.openjdk.java.net/%7Ejzavgren/8012108/webrev.03/ Thanks! John On 04/20/2013 10:36 AM, Kurchi Subhra Hazra wrote: On Apr 20, 2013, at 4:40 AM, Dmitry Samersoffdmitry.samers...@oracle.com wrote: Kurchi, if *netaddrPP == NULL at 367 and calloc fails at 391 we would jump to freeAllocatedMemory with start == NULL True, but then we skip to line 444 since *netaddrPP == NULL, so we don't get to line 438. I am just saying it is not strictly necessary to check if start is null before entering the first if block. We might want to guard against how the code changes in future and put in the check though. I have no ideas whether this code path is possible in reality or not, but it stops my eyes. -Dmitry On 2013-04-20 14:55, Kurchi Subhra Hazra wrote: On Apr 20, 2013, at 3:16 AM, Dmitry Samersoffdmitry.samers...@oracle.com wrote: John, 102, 145 else is redundant. 438 - we will crash here if start is null Maybe it is good to have an additional check for start != null, but from what I see, start will not be null if *netaddrPP is not null. -Dmitry On 2013-04-20 01:33, John Zavgren wrote: Greetings: I fixed the bad realloc pattern. Please let me know what you think. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.02/ Thanks! John Z - Original Message - From:chris.hega...@oracle.com To:net-dev@openjdk.java.net,john.zavg...@oracle.com Cc:dmitry.samers...@oracle.com Sent: Friday, April 19, 2013 8:59:25 AM GMT -05:00 US/Canada Eastern Subject: Re: RFR-JDK8012108 On 18/04/2013 22:11, Dmitry Samersoff wrote: John, I see bad realloc pattern here. Could you fix it as well? Yes, please. Otherwise the changes look fine. -Chris. e.g. 93 adapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); -Dmitry On 2013-04-19 00:56, John Zavgren wrote: Greetings: I fixed a case in the windows native code where calloc() was being used without checking it's returned value. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.01/ Thanks! John Zavgren -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer -- John Zavgren john.zavg...@oracle.com 603-821-0904 US-Burlington-MA
Re: RFR-JDK8012108
On 04/20/2013 02:06 AM, Kurchi Subhra Hazra wrote: Hi John, Minor nit, the formatting around line 101 looks off, How about something like this: if { // remains same } else { adapterInfo = adapterInfoTemp; } Or simply, just leave the else out. adapterInfoTemp = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); if (adapterInfoTemp == NULL) { free(adapterInfo); return -1; } adapterInfo = adapterInfoTemp; -Chris. - Kurchi On 4/19/13 2:33 PM, John Zavgren wrote: Greetings: I fixed the bad realloc pattern. Please let me know what you think. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.02/ Thanks! John Z - Original Message - From:chris.hega...@oracle.com To:net-dev@openjdk.java.net,john.zavg...@oracle.com Cc:dmitry.samers...@oracle.com Sent: Friday, April 19, 2013 8:59:25 AM GMT -05:00 US/Canada Eastern Subject: Re: RFR-JDK8012108 On 18/04/2013 22:11, Dmitry Samersoff wrote: John, I see bad realloc pattern here. Could you fix it as well? Yes, please. Otherwise the changes look fine. -Chris. e.g. 93 adapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); -Dmitry On 2013-04-19 00:56, John Zavgren wrote: Greetings: I fixed a case in the windows native code where calloc() was being used without checking it's returned value. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.01/ Thanks! John Zavgren
Re: RFR-JDK8012108
On Apr 20, 2013, at 3:16 AM, Dmitry Samersoff dmitry.samers...@oracle.com wrote: John, 102, 145 else is redundant. 438 - we will crash here if start is null Maybe it is good to have an additional check for start != null, but from what I see, start will not be null if *netaddrPP is not null. -Dmitry On 2013-04-20 01:33, John Zavgren wrote: Greetings: I fixed the bad realloc pattern. Please let me know what you think. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.02/ Thanks! John Z - Original Message - From: chris.hega...@oracle.com To: net-dev@openjdk.java.net, john.zavg...@oracle.com Cc: dmitry.samers...@oracle.com Sent: Friday, April 19, 2013 8:59:25 AM GMT -05:00 US/Canada Eastern Subject: Re: RFR-JDK8012108 On 18/04/2013 22:11, Dmitry Samersoff wrote: John, I see bad realloc pattern here. Could you fix it as well? Yes, please. Otherwise the changes look fine. -Chris. e.g. 93 adapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); -Dmitry On 2013-04-19 00:56, John Zavgren wrote: Greetings: I fixed a case in the windows native code where calloc() was being used without checking it's returned value. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.01/ Thanks! John Zavgren -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer
Re: RFR-JDK8012108
Kurchi, if *netaddrPP == NULL at 367 and calloc fails at 391 we would jump to freeAllocatedMemory with start == NULL I have no ideas whether this code path is possible in reality or not, but it stops my eyes. -Dmitry On 2013-04-20 14:55, Kurchi Subhra Hazra wrote: On Apr 20, 2013, at 3:16 AM, Dmitry Samersoff dmitry.samers...@oracle.com wrote: John, 102, 145 else is redundant. 438 - we will crash here if start is null Maybe it is good to have an additional check for start != null, but from what I see, start will not be null if *netaddrPP is not null. -Dmitry On 2013-04-20 01:33, John Zavgren wrote: Greetings: I fixed the bad realloc pattern. Please let me know what you think. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.02/ Thanks! John Z - Original Message - From: chris.hega...@oracle.com To: net-dev@openjdk.java.net, john.zavg...@oracle.com Cc: dmitry.samers...@oracle.com Sent: Friday, April 19, 2013 8:59:25 AM GMT -05:00 US/Canada Eastern Subject: Re: RFR-JDK8012108 On 18/04/2013 22:11, Dmitry Samersoff wrote: John, I see bad realloc pattern here. Could you fix it as well? Yes, please. Otherwise the changes look fine. -Chris. e.g. 93 adapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); -Dmitry On 2013-04-19 00:56, John Zavgren wrote: Greetings: I fixed a case in the windows native code where calloc() was being used without checking it's returned value. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.01/ Thanks! John Zavgren -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer
Re: RFR-JDK8012108
On Apr 20, 2013, at 4:40 AM, Dmitry Samersoff dmitry.samers...@oracle.com wrote: Kurchi, if *netaddrPP == NULL at 367 and calloc fails at 391 we would jump to freeAllocatedMemory with start == NULL True, but then we skip to line 444 since *netaddrPP == NULL, so we don't get to line 438. I am just saying it is not strictly necessary to check if start is null before entering the first if block. We might want to guard against how the code changes in future and put in the check though. I have no ideas whether this code path is possible in reality or not, but it stops my eyes. -Dmitry On 2013-04-20 14:55, Kurchi Subhra Hazra wrote: On Apr 20, 2013, at 3:16 AM, Dmitry Samersoff dmitry.samers...@oracle.com wrote: John, 102, 145 else is redundant. 438 - we will crash here if start is null Maybe it is good to have an additional check for start != null, but from what I see, start will not be null if *netaddrPP is not null. -Dmitry On 2013-04-20 01:33, John Zavgren wrote: Greetings: I fixed the bad realloc pattern. Please let me know what you think. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.02/ Thanks! John Z - Original Message - From: chris.hega...@oracle.com To: net-dev@openjdk.java.net, john.zavg...@oracle.com Cc: dmitry.samers...@oracle.com Sent: Friday, April 19, 2013 8:59:25 AM GMT -05:00 US/Canada Eastern Subject: Re: RFR-JDK8012108 On 18/04/2013 22:11, Dmitry Samersoff wrote: John, I see bad realloc pattern here. Could you fix it as well? Yes, please. Otherwise the changes look fine. -Chris. e.g. 93 adapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); -Dmitry On 2013-04-19 00:56, John Zavgren wrote: Greetings: I fixed a case in the windows native code where calloc() was being used without checking it's returned value. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.01/ Thanks! John Zavgren -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer -- Dmitry Samersoff Oracle Java development team, Saint Petersburg, Russia * Give Rabbit time, and he'll always get the answer
Re: RFR-JDK8012108
On 18/04/2013 22:11, Dmitry Samersoff wrote: John, I see bad realloc pattern here. Could you fix it as well? Yes, please. Otherwise the changes look fine. -Chris. e.g. 93 adapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); -Dmitry On 2013-04-19 00:56, John Zavgren wrote: Greetings: I fixed a case in the windows native code where calloc() was being used without checking it's returned value. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.01/ Thanks! John Zavgren
Re: RFR-JDK8012108
Greetings: I fixed the bad realloc pattern. Please let me know what you think. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.02/ Thanks! John Z - Original Message - From: chris.hega...@oracle.com To: net-dev@openjdk.java.net, john.zavg...@oracle.com Cc: dmitry.samers...@oracle.com Sent: Friday, April 19, 2013 8:59:25 AM GMT -05:00 US/Canada Eastern Subject: Re: RFR-JDK8012108 On 18/04/2013 22:11, Dmitry Samersoff wrote: John, I see bad realloc pattern here. Could you fix it as well? Yes, please. Otherwise the changes look fine. -Chris. e.g. 93 adapterInfo = (IP_ADAPTER_ADDRESSES *) realloc (adapterInfo, len); -Dmitry On 2013-04-19 00:56, John Zavgren wrote: Greetings: I fixed a case in the windows native code where calloc() was being used without checking it's returned value. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.01/ Thanks! John Zavgren
RFR-JDK8012108
Greetings: I fixed a case in the windows native code where calloc() was being used without checking it's returned value. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.01/ Thanks! John Zavgren
Re: RFR-JDK8012108
Thanks John, I think the leak is taken care of now, I can sponsor the change for you once you have a thumbs up from everyone. - Kurchi On 4/18/2013 1:56 PM, John Zavgren wrote: Greetings: I fixed a case in the windows native code where calloc() was being used without checking it's returned value. http://cr.openjdk.java.net/~jzavgren/8012108/webrev.01/ http://cr.openjdk.java.net/%7Ejzavgren/8012108/webrev.01/ Thanks! John Zavgren -- -Kurchi