From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by sourceware.org (Postfix) with ESMTPS id 01002388C025 for ; Wed, 2 Jun 2021 19:02:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 01002388C025 Received: by mail-qk1-x729.google.com with SMTP id j189so3519616qkf.2 for ; Wed, 02 Jun 2021 12:02:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=j4MK453/K4ruoIhMuxtu+dcr8r6hBas8uJtPwPeQS8g=; b=CRRIzdbFZg3yLcVv7Iq48tZNDWH3AOCV0Fe5c41DFejmmR2U3E9ttNxy1TvmT281Aa g+zET1GlyP24RtdWSHZbf+sult8jhkpj8iw0ls+7ZDxfCH36gzW6f5CARTPFPq517NdY i1y5ahnxI7LKa8INR9ixj1W/pp2ABbJoYX89UhUAS+uQ4MNZPKt+gDU76aF8ilTwQcm7 eTBWsGT8Za4wEF30Mqc8Dq1HMGmJFOrqUrHoFharY6V9+JXSAtV5e6CJtJczQRAdEV5E b9BxM4GK6k5V8iJaKtTtizQ/lS5caeghzhRC/CNCa7B+JCwj4gGKdBS/gwrEV+i9mmIF dZuQ== X-Gm-Message-State: AOAM530krKxVIzfMtaMGG9pYrBdSwT95/kibCm4AR9H0Ir3jYmVhNz5X L5x8DrGXO2+OuEceCdn1ed+3IpxXRWsetA== X-Google-Smtp-Source: ABdhPJwMNGM0XYQKIgFYGA+LyYiX40qqzmNFKHt9nSdP4mUbj2AeZJJJo87//Qs3f629IU+cqX5qBg== X-Received: by 2002:a37:9e58:: with SMTP id h85mr17843208qke.341.1622660540329; Wed, 02 Jun 2021 12:02:20 -0700 (PDT) Received: from [192.168.1.4] ([177.194.59.218]) by smtp.gmail.com with ESMTPSA id u186sm443496qkd.30.2021.06.02.12.02.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 02 Jun 2021 12:02:20 -0700 (PDT) Subject: Re: [PATCH v3] nptl: Deallocate the thread stack on setup failure (BZ #19511) To: libc-alpha@sourceware.org References: <20210527172823.3461314-3-adhemerval.zanella@linaro.org> <20210602125644.3725112-1-adhemerval.zanella@linaro.org> <87r1hkjtwj.fsf@igel.home> <4e623fa1-419e-5c54-2da3-61a2c3f143ed@linaro.org> <87mts8jsda.fsf@igel.home> <28311d99-55b0-808f-5130-1a9895b9cf77@linaro.org> <87im2wjr6f.fsf@igel.home> <87y2bst8z4.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Message-ID: Date: Wed, 2 Jun 2021 16:02:17 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <87y2bst8z4.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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: , X-List-Received-Date: Wed, 02 Jun 2021 19:02:22 -0000 On 02/06/2021 15:30, Florian Weimer via Libc-alpha wrote: > * Joseph Myers: > >> On Wed, 2 Jun 2021, Andreas Schwab wrote: >> >>> On Jun 02 2021, Adhemerval Zanella wrote: >>> >>>> I don't have a strong preference here, maybe use a 'bool' then? >>> >>> bool has architecture dependent size. >> >> bool is one byte for all configurations supported by glibc (the only >> configuration supported by GCC for which it isn't is powerpc-darwin). >> Although I don't see any likely reason for glibc code to depend on it >> being one byte. > > However, one reason not to use bool in internal code is that our own > atomics do not support one-byte types on all architectures. > > For example this definition in sysdeps/powerpc/atomic-machine.h: > > #define atomic_exchange_acq(mem, value) \ > ({ \ > __typeof (*(mem)) __result; \ > if (sizeof (*mem) == 4) \ > __result = __arch_atomic_exchange_32_acq (mem, value); \ > else if (sizeof (*mem) == 8) \ > __result = __arch_atomic_exchange_64_acq (mem, value); \ > else \ > abort (); \ > __result; \ > }) I think it should be safe to use on code that won't be used for atomic operations. The this specific flag, for instance, is protected by the PD lock.