From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 98F063858436 for ; Fri, 3 Dec 2021 12:32:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 98F063858436 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 90A58301B4B1; Fri, 3 Dec 2021 13:32:45 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 45B08425A440; Fri, 3 Dec 2021 13:32:45 +0100 (CET) Message-ID: <958ecae7e35f15bc83bcfdeb6b911e89e9dd4b31.camel@klomp.org> Subject: Re: [PATCH] debuginfod: Use gmtime_r instead of gmtime to avoid data race From: Mark Wielaard To: "Frank Ch. Eigler" Cc: elfutils-devel@sourceware.org Date: Fri, 03 Dec 2021 13:32:45 +0100 In-Reply-To: <20211201132619.GE17988@redhat.com> References: <20211201125026.13186-1-mark@klomp.org> <20211201132619.GE17988@redhat.com> 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, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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, 03 Dec 2021 12:32:48 -0000 Hi, On Wed, 2021-12-01 at 08:26 -0500, Frank Ch. Eigler wrote: > Since we are multi-threaded using gmtime might cause a data race > > because gmtime reuses a global struct to write data into. Make > > sure that each thread uses their own struct tm and use gmtime_r > > instead. >=20 > (thanks, lgtm) Thanks, pushed. Cheers, Mark