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.7 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,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 C97E41F5AE for ; Wed, 28 Apr 2021 17:43:18 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EC46B395041D; Wed, 28 Apr 2021 17:43:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EC46B395041D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1619631798; bh=kbRwE8LWSvi/Ie6eemGWa3yri5zCYqLnVGDEZrIv+FM=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=DuJc4eGd6OsQ8INwqLiOIUN/YFTH4mhFBVzFqpxMuBPVrtEo+HHba7BZzwQhNoEZQ Ran4PegiyqZCpB0EIBc3aqVBb6bZgIeLfnVamblAQ7hBZPLfsZWGHcEAkC5X019uvh wddKxqZ+M6f+7dRqWoGDNkjSuI13huR4PYLQa+mQ= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 3FD933854804 for ; Wed, 28 Apr 2021 17:43:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 3FD933854804 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-122-M7Li3NaaMyOalFe7vYioNg-1; Wed, 28 Apr 2021 13:43:11 -0400 X-MC-Unique: M7Li3NaaMyOalFe7vYioNg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A610D8014C1; Wed, 28 Apr 2021 17:43:10 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-113-20.ams2.redhat.com [10.36.113.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1F54219C45; Wed, 28 Apr 2021 17:43:08 +0000 (UTC) To: Bruno Haible Subject: Re: Undefined use of weak symbols in gnulib References: <87o8e0p92r.fsf@oldenburg.str.redhat.com> <19516512.8WduG5kV5J@omega> <875z06lu3v.fsf@oldenburg.str.redhat.com> <2800926.834q8TerIH@omega> Date: Wed, 28 Apr 2021 19:43:39 +0200 In-Reply-To: <2800926.834q8TerIH@omega> (Bruno Haible's message of "Wed, 28 Apr 2021 16:40:18 +0200") Message-ID: <87sg3agv90.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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: , From: Florian Weimer via Libc-alpha Reply-To: Florian Weimer Cc: libc-alpha@sourceware.org, bug-gnulib@gnu.org, binutils@sourceware.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" * Bruno Haible: > So, in the normal cases (link with '-lpthread', link without '-lpthread', > and even with dlopen()), everything will work fine. The only problematic > case thus is the the use of LD_PRELOAD. Right? LD_PRELOAD and glibc 2.34 as originally planned. > I think few packages in a distro will be affected. And few users are > using LD_PRELOAD on their own, because since the time when glibc > started to use 'internal' calls to system calls where possible, there > are not a lot of uses of LD_PRELOAD that still work. We get the occasional bug report when these things break. We have not seen much of that yet because our gnulib-using programs are still at older versions for most of our users. Here's an example of such a bug report, although not for libpthread: powerpc: libc segfaults when LD_PRELOADed with libgcc I think in this bug, libc.so.6 was invoked during some build process (which could easily run bison as well, so it has to work with LD_PRELOAD). >> No. glibc 2.34 will behave as if an implicit -lpthread is present on >> the linker program line. > > Good. This means a bullet-proof way for a distro to avoid the problem > is to "rebuild the world" after importing glibc 2.34. Yeah, but that's not good enough. So I spent today on coming up with a workaround in glibc. >> No, it's unrelated. The crash or other undefined behavior is a >> consequence of actions of the link editor and cannot be reverted at run >> time. > > In other words, the problem is that > - there are some/many binaries out there, that were produced by an 'ld' > that did not anticipate the changes in glibc 2.34, and > - these binaries have a problem not when run directly, but only when > run with LD_PRELOAD. > > Right? No, glibc 2.34 won't need LD_PRELOAD to expose the bug. LD_PRELOAD is just a development aid that reveals the problem with glibc 2.33 and earlier. Thanks, Florian