From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 06BB71F55B for ; Mon, 1 Jun 2020 18:14:03 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 1129B387085D; Mon, 1 Jun 2020 18:14:02 +0000 (GMT) Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id D6B5C386F41D for ; Mon, 1 Jun 2020 18:13:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D6B5C386F41D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fw@deneb.enyo.de Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1jfowf-0002nQ-TM; Mon, 01 Jun 2020 18:13:57 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1jfowf-0000NF-Oj; Mon, 01 Jun 2020 20:13:57 +0200 From: Florian Weimer To: Adhemerval Zanella via Libc-alpha Subject: Re: [PATCH 05/13] string: Remove old TLS usage on strsignal References: <20200519180518.318733-1-adhemerval.zanella@linaro.org> <20200519180518.318733-6-adhemerval.zanella@linaro.org> <87y2pccmsj.fsf@oldenburg2.str.redhat.com> <4ead5141-c6ba-3fde-d30c-872a1024dfd1@linaro.org> Date: Mon, 01 Jun 2020 20:13:57 +0200 In-Reply-To: <4ead5141-c6ba-3fde-d30c-872a1024dfd1@linaro.org> (Adhemerval Zanella via Libc-alpha's message of "Mon, 1 Jun 2020 15:08:50 -0300") Message-ID: <87tuzuwt5m.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Weimer Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" * Adhemerval Zanella via Libc-alpha: >>> diff --git a/malloc/thread-freeres.c b/malloc/thread-freeres.c >>> index c71ca4fc33..d42eea770b 100644 >>> --- a/malloc/thread-freeres.c >>> +++ b/malloc/thread-freeres.c >>> @@ -32,6 +32,7 @@ __libc_thread_freeres (void) >>> call_function_static_weak (__rpc_thread_destroy); >>> call_function_static_weak (__res_thread_freeres); >>> call_function_static_weak (__strerror_thread_freeres); >>> + call_function_static_weak (__strsignal_thread_freeres); >>=20 >> I think you can call free directly. I doubt it increases binary >> size=E2=80=94the data is in the thread descriptor, so nothing needs to b= e pulled >> into the link for this. > > Don't we need it to deallocate the memory in the case of a libc > loaded in a different namespace?=20 Right, but using call_function_static_weak does not achieve that. This is a general problem with using TLS that needs separate deallocation. We don't have per-namespace thread exit hooks, but we probably need them.