Re: RFR: JDK-8261791: (sctp) handleSendFailed in SctpChannelImpl.c potential leaks
On Wed, 17 Feb 2021 13:43:14 GMT, Daniel Fuchs wrote: > As pointed out by Alan: It seems like a space is missing after the colon in > the PR title lets give it a try. Thanks ! - PR: https://git.openjdk.java.net/jdk/pull/2586
Re: RFR: JDK-8261791: (sctp) handleSendFailed in SctpChannelImpl.c potential leaks
On Wed, 17 Feb 2021 13:36:17 GMT, Alan Bateman wrote: > Here's the jcheck failure: > https://github.com/openjdk/jdk/pull/2586/checks?check_run_id=1918880270 Hi Alan , I am aware of the jcheck message. It claims : "The commit message does not reference any issue. " I adjusted now the for the 3 or 4th time the message "JDK-8261791:(sctp) handleSendFailed in SctpChannelImpl.c potential leaks" without any progress . I think this is because it was modified in JBS after I created it (never had this problem without such a JBS modification). - PR: https://git.openjdk.java.net/jdk/pull/2586
Re: RFR: JDK-8261791:(sctp) handleSendFailed in SctpChannelImpl.c potential leaks
On Wed, 17 Feb 2021 13:36:17 GMT, Alan Bateman wrote: >> Looks like I cannot integrate it, even after changing the title!? >> Is this a bug? > > Here's the jcheck failure: > https://github.com/openjdk/jdk/pull/2586/checks?check_run_id=1918880270 As pointed out by Alan: It seems like a space is missing after the colon in the PR title - PR: https://git.openjdk.java.net/jdk/pull/2586
Re: RFR: JDK-8261791:(sctp) handleSendFailed in SctpChannelImpl.c potential leaks
On Wed, 17 Feb 2021 13:27:13 GMT, Matthias Baesken wrote: >> Hi Alan and Chris, thanks for the reviews. > > Looks like I cannot integrate it, even after changing the title!? > Is this a bug? Here's the jcheck failure: https://github.com/openjdk/jdk/pull/2586/checks?check_run_id=1918880270 - PR: https://git.openjdk.java.net/jdk/pull/2586
Re: RFR: JDK-8261791:(sctp) handleSendFailed in SctpChannelImpl.c potential leaks
On Wed, 17 Feb 2021 13:19:13 GMT, Matthias Baesken wrote: >> The changes looks okay to me. I see Chris has created JDK-8261881 to setup >> the cleanup. > > Hi Alan and Chris, thanks for the reviews. Looks like I cannot integrate it, even after changing the title!? Is this a bug? - PR: https://git.openjdk.java.net/jdk/pull/2586
Re: RFR: JDK-8261791:(sctp) handleSendFailed in SctpChannelImpl.c potential leaks
On Wed, 17 Feb 2021 12:51:06 GMT, Alan Bateman wrote: >> In another bug this question from me was answered by Alan Bateman : >> >> Btw. while adjusting Java_sun_nio_ch_sctp_SctpChannelImpl_receive0 , I >> started to wonder what happens to the allocated memory in the same file in >> handleSendFailed ( if ((addressP = malloc(dataLength)) == NULL) ) in early >> return cases incl. the CHECK_NULL , is there some deallocation missing there >> too ? >> >> >> Yes, the error paths in handleSendFailed should be looked at. If >> NewDirectByteBuffer or recvmsg fails then addressP needs to be freed. >> Furthermore, if the NewObject fails and bufferObj != NULL then the memory >> for the direct buffer will need to be freed too (as JNI NewDirectByteBuffer >> does not setup a cleaner). >> >> >> So I added freeing of the malloced memory to handleSendFailed . >> Please review ! >> >> Thanks, Matthias > > The changes looks okay to me. I see Chris has created JDK-8261881 to setup > the cleanup. Hi Alan and Chris, thanks for the reviews. - PR: https://git.openjdk.java.net/jdk/pull/2586