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-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-3.4 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, RDNS_DYNAMIC,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (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 98F571F5AE for ; Tue, 27 Apr 2021 21:07:11 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8FBED398B883; Tue, 27 Apr 2021 21:07:10 +0000 (GMT) Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id DF8553896815 for ; Tue, 27 Apr 2021 21:07:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DF8553896815 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=joseph_myers@mentor.com IronPort-SDR: mwRHmEPqrW4a0IkWhrBzlPUoxTufQ4YizN2XjD+hv4Bb0rYWgZ44LpstiyUVvJEWn1Fulq6l6I hqTfd/op9PYSwZh/pPhj0xLjTJaeozHdh5tjFj5uXW8I90I/8gjne5tLk22T7NLEga76WujwAj dJnSFxBUtCCUlgUPUo4/6O161gzBxmn0PHQYdLT+fHe1qa9PRP2JyDoIkdAcXejw4hiTVA5+Eh YyXz5MqU8OBZCtha+TMbDj0I7qzObHl5I8u7EpXx+P84J708H2B0sOSAuam2s3J999olx7G5H9 gfI= X-IronPort-AV: E=Sophos;i="5.82,255,1613462400"; d="scan'208";a="60599491" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 27 Apr 2021 13:07:07 -0800 IronPort-SDR: YNAFjWLETVaJ9PHIywUhN/vfBO3cw98/qN8259NG8lW1QUelTrVN8FK3oS7CqHzPph/nfAwEFE EDaR92pqTgvi39QWVHaajhl3/3O+jnCRynlQsxqY94gavWWTVsnLRIj67+52k5qdIGGYJvQ//u 36OE9sclAEVz5eLvruKutsTXOXUjwI7XJm2ftQGwY75ErinhGx7qTSOQ482rRGJ81G0jhmjG9P GcIfj+RIDE4qtMxG8yds2IKKccF5uMf9tTJPCx/qXMbTMNfxz7t5mxp+zDgbzFDWk4qS+eW3Bf ZVw= Date: Tue, 27 Apr 2021 21:07:01 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Martin Sebor Subject: Re: [PATCH] add attribute none to pthread_setspecific (BZ #27714) In-Reply-To: Message-ID: References: <2ec7fadb-cc15-a005-f708-d2adecc8cc39@gmail.com> <875z08qqy8.fsf@oldenburg.str.redhat.com> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-09.mgc.mentorg.com (139.181.222.9) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) 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 , Martin Sebor via Libc-alpha Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" On Tue, 27 Apr 2021, Martin Sebor via Libc-alpha wrote: > You're right. I had inadvertently reverted the pthread.h changes so > my testing didn't expose it. Too many patches in the same tree... > I've committed a1561c3bbe with the missing definition (and retesting > the macro). How was that commit tested? It breaks the glibc testsuite build for me with GCC 11 (on x86_64, also seen on lots of other architectures with build-many-glibcs.py). tst-tsd3.c: In function 'tf': tst-tsd3.c:71:7: error: 'pthread_setspecific' expecting 1 byte in a region of size 0 [-Werror=stringop-overread] 71 | if (pthread_setspecific (key1, (void *) 1l) != 0 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../include/pthread.h:1, from tst-tsd3.c:20: ../sysdeps/nptl/pthread.h:1184:12: note: in a call to function 'pthread_setspecific' declared with attribute 'access (none, 2)' 1184 | extern int pthread_setspecific (pthread_key_t __key, | ^~~~~~~~~~~~~~~~~~~ tst-tsd3.c:72:10: error: 'pthread_setspecific' expecting 1 byte in a region of size 0 [-Werror=stringop-overread] 72 | || pthread_setspecific (key2, (void *) 1l) != 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../include/pthread.h:1, from tst-tsd3.c:20: ../sysdeps/nptl/pthread.h:1184:12: note: in a call to function 'pthread_setspecific' declared with attribute 'access (none, 2)' 1184 | extern int pthread_setspecific (pthread_key_t __key, | ^~~~~~~~~~~~~~~~~~~ tst-tsd3.c: In function 'destr2': tst-tsd3.c:56:11: error: 'pthread_setspecific' expecting 1 byte in a region of size 0 [-Werror=stringop-overread] 56 | if (pthread_setspecific (key1, (void *) 1l) != 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../include/pthread.h:1, from tst-tsd3.c:20: ../sysdeps/nptl/pthread.h:1184:12: note: in a call to function 'pthread_setspecific' declared with attribute 'access (none, 2)' 1184 | extern int pthread_setspecific (pthread_key_t __key, | ^~~~~~~~~~~~~~~~~~~ tst-tsd3.c: In function 'destr1': tst-tsd3.c:40:11: error: 'pthread_setspecific' expecting 1 byte in a region of size 0 [-Werror=stringop-overread] 40 | if (pthread_setspecific (key2, (void *) 1l) != 0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../include/pthread.h:1, from tst-tsd3.c:20: ../sysdeps/nptl/pthread.h:1184:12: note: in a call to function 'pthread_setspecific' declared with attribute 'access (none, 2)' 1184 | extern int pthread_setspecific (pthread_key_t __key, | ^~~~~~~~~~~~~~~~~~~ (I also see similar errors building tst-tsd4.c. The testsuite builds cleanly with the same compiler and the previous glibc commit.) -- Joseph S. Myers joseph@codesourcery.com