From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (wildebeest.demon.nl [212.238.236.112]) by sourceware.org (Postfix) with ESMTPS id 2CFEE3984077 for ; Fri, 9 Jul 2021 10:27:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2CFEE3984077 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from tarox.wildebeest.org (83-87-18-245.cable.dynamic.v4.ziggo.nl [83.87.18.245]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 09799302FBA6; Fri, 9 Jul 2021 12:27:46 +0200 (CEST) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 38BC4401656F; Fri, 9 Jul 2021 12:27:41 +0200 (CEST) Message-ID: <5ac2eef6cda0bad80556e3018d0ef8e0c5cb4e0a.camel@klomp.org> Subject: Re: [PATCH] PR27531: retry within default retry_limit will be supported. In debuginfod-client.c (debuginfod_query_server), insert a goto statement for jumping back to the beginning of curl handles set up if query fails and a non ENOENT error is returned. From: Mark Wielaard To: Alice Zhang Cc: elfutils-devel@sourceware.org Date: Fri, 09 Jul 2021 12:27:41 +0200 In-Reply-To: References: <20210706201502.336113-1-alizhang@redhat.com> <84304ca22a64e31485dda14667077975cb639cc7.camel@klomp.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-10.el7) Mime-Version: 1.0 X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jul 2021 10:27:49 -0000 Hi Alice (adding elfutils-devel back to CC), On Thu, 2021-07-08 at 16:34 -0400, Alice Zhang wrote: > Hi, Mark, I made modifications as you suggested. I relocated the goto > statement and now the resources will be reused. That rearrangement is better than what I suggested with the free and (re)malloc. And thanks for adding the documentation. The commit message looks good too. > Also, I run valgrind --leak-check=3Dfull and here's the result: > =3D=3D464842=3D=3D > =3D=3D464842=3D=3D HEAP SUMMARY: > =3D=3D464842=3D=3D in use at exit: 215,989 bytes in 2,167 blocks > =3D=3D464842=3D=3D total heap usage: 3,866 allocs, 1,699 frees, 509,558= bytes > allocated > =3D=3D464842=3D=3D > =3D=3D464842=3D=3D LEAK SUMMARY: > =3D=3D464842=3D=3D definitely lost: 0 bytes in 0 blocks > =3D=3D464842=3D=3D indirectly lost: 0 bytes in 0 blocks > =3D=3D464842=3D=3D possibly lost: 0 bytes in 0 blocks > =3D=3D464842=3D=3D still reachable: 215,989 bytes in 2,167 blocks > =3D=3D464842=3D=3D suppressed: 0 bytes in 0 blocks > =3D=3D464842=3D=3D Reachable blocks (those to which a pointer was found) = are not > shown. > =3D=3D464842=3D=3D To see them, rerun with: --leak-check=3Dfull --show-le= ak-kinds=3Dall > =3D=3D464842=3D=3D > =3D=3D464842=3D=3D For lists of detected and suppressed errors, rerun wit= h: -s > =3D=3D464842=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0= from 0) Looks great. The still reachable blocks are from the libcurl global initialization and not an issue. Pushed your rearranged version to master. Thanks, Mark