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: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id CCDC51F8C6 for ; Mon, 12 Jul 2021 10:04:36 +0000 (UTC) Received: from localhost ([::1]:43430 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m2snj-0002qa-Lg for normalperson@yhbt.net; Mon, 12 Jul 2021 06:04:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36996) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2sng-0002pv-4W for bug-gnulib@gnu.org; Mon, 12 Jul 2021 06:04:32 -0400 Received: from smtp-relay-canonical-1.canonical.com ([185.125.188.121]:37192) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m2snd-0000oz-B5 for bug-gnulib@gnu.org; Mon, 12 Jul 2021 06:04:31 -0400 Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPS id 392EF40333 for ; Mon, 12 Jul 2021 10:04:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1626084264; bh=VKIyYtDn8TceEx4kTHvvnnBiwOdtDczEEvVQd0awbO0=; h=MIME-Version:From:Date:Message-ID:Subject:To:Content-Type; b=vDrmEXApI4lEZ3pl/AR59iOB0mtZ8/knr5jOncDtK1kSEJLpdmzHPVF3BJdK8Ji0d l1zUikgq7SDrjsDmojRRyx+sg0LZNze5jvOfz0KLOmJ9FuzOY41SiKL1Co3WOuDvR2 MPjrX0+P8I0r2zO5CH6kgtJ9Ue0VdkyAGZ9UfBsp4kE98ZMLr2/AiIY2QqKTZvEbGB ZUag07YVC7dvV9x0mD/d2d7eR7uSp9VWXkH7H55jwOqXPcoDn/dVFdeB1ZiYqkfNfe /xhHRvzVijLpimS+4THfW/eYyD54aUjqqflUD/ImKL9NHJuhjO/nOwXxtxsPcgiBkS 2qzrnyNECOqEw== Received: by mail-pg1-f199.google.com with SMTP id k9-20020a63d1090000b029021091ebb84cso14200159pgg.3 for ; Mon, 12 Jul 2021 03:04:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VKIyYtDn8TceEx4kTHvvnnBiwOdtDczEEvVQd0awbO0=; b=QHaJ8cPXDdBIu41KbX7opqK7Jm4Ir19JSRsJQDy1tzO5MhUzxHkWW7deZkAf3snh25 b7pY+HSu1U3bBL8Wxzl92ZMDoOh5bEYt8wdtt6vlYcvBgeUUEPT/YL+OfB9mKKhaDrSX 6coUushbE6Qua4FaA2/dLwfsogsZoSe/nXdaikiaw19DqQarIKUgkiJ8bZqP+VK1j77F PTykoRxqfLNo+9L/dvrd0JUt7niYuUoouNYJHdzr41p2iBrmOWWTszQAzvHcKkWL9Dre NY43AvtzYUl9AE25Z57ndadIdjtuo3ryV0NJWyNn6xpft6QRljI/k5ZAyclOEjUSjJkC SWow== X-Gm-Message-State: AOAM530O3LW/jtupU+BeO9DLAe3aqXf83xcY04khvWY2Ixy53VIziIcm 65ls23Me0bqzufJYZxmGfQVQeETxyQofQRsSpyDfYEW3ND3SxBt8V72daCPSGDUadL49gP9m/dn 9Ghkm4ZOSb5AakSNmfLbzxzzIi2oYU3FRXDjAhgh5OluP X-Received: by 2002:a17:90a:28a5:: with SMTP id f34mr17574024pjd.107.1626084262820; Mon, 12 Jul 2021 03:04:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYaWuwnJFtIj4dLJyBcvY1yt7++0bwox4sUwZohUxMtK/rG+3p78eL/7QnpSavqyxZMiBaW1sfxgfifR5epx8= X-Received: by 2002:a17:90a:28a5:: with SMTP id f34mr17574003pjd.107.1626084262521; Mon, 12 Jul 2021 03:04:22 -0700 (PDT) MIME-Version: 1.0 References: <87o8e0p92r.fsf@oldenburg.str.redhat.com> In-Reply-To: <87o8e0p92r.fsf@oldenburg.str.redhat.com> From: Michael Hudson-Doyle Date: Mon, 12 Jul 2021 22:04:11 +1200 Message-ID: Subject: Re: Undefined use of weak symbols in gnulib To: Florian Weimer Content-Type: multipart/alternative; boundary="000000000000d7c84105c6ea3e91" Received-SPF: none client-ip=185.125.188.121; envelope-from=michael.hudson@canonical.com; helo=smtp-relay-canonical-1.canonical.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: libc-alpha@sourceware.org, bug-gnulib@gnu.org, binutils@sourceware.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" --000000000000d7c84105c6ea3e91 Content-Type: text/plain; charset="UTF-8" On Tue, 27 Apr 2021 at 17:53, Florian Weimer wrote: > lib/glthread/lock.h has this: > > | /* The way to test at runtime whether libpthread is present is to test > | whether a function pointer's value, such as &pthread_mutex_init, is > | non-NULL. However, some versions of GCC have a bug through which, in > | PIC mode, &foo != NULL always evaluates to true if there is a direct > | call to foo(...) in the same function. To avoid this, we test the > | address of a function in libpthread that we don't use. */ > [snip] This will become an urgent issue with glibc 2.34, which defines > pthread_mutexattr_gettype unconditionally. Certain gnulib modules will > stop working until the binaries are relinked. I expect the issue is > already visible with earlier glibc versions if libpthread is > unexpectedly present at run time. > Did this thread ever reach a conclusion? I'm testing a snapshot of glibc 2.34 in ubuntu and running into this issue -- bison segfaults on startup on ppc64el. There is some talk of 'rebuilding the world' once 2.34 lands in a distro but that might be hard because I suspect the world might be too broken to do that (maybe it's not that bad really... but it doesn't sound like fun). Cheers, mwh --000000000000d7c84105c6ea3e91 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, 27 Apr 2021 at 17:53, Florian Wei= mer <fweimer@redhat.com> wr= ote:
lib/glthread/lock.h has this:

| /* The way to test at runtime whether libpthread is present is to test |=C2=A0 =C2=A0 whether a function pointer's value, such as &pthread= _mutex_init, is
|=C2=A0 =C2=A0 non-NULL.=C2=A0 However, some versions of GCC have a bug thr= ough which, in
|=C2=A0 =C2=A0 PIC mode, &foo !=3D NULL always evaluates to true if the= re is a direct
|=C2=A0 =C2=A0 call to foo(...) in the same function.=C2=A0 To avoid this, = we test the
|=C2=A0 =C2=A0 address of a function in libpthread that we don't use.= =C2=A0 */

[snip]

This will become an urgent = issue with glibc 2.34, which defines
pthread_mutexattr_gettype unconditionally.=C2=A0 Certain gnulib modules wil= l
stop working until the binaries are relinked.=C2=A0 I expect the issue is already visible with earlier glibc versions if libpthread is
unexpectedly present at run time.

Did t= his thread ever reach a conclusion? I'm testing a snapshot of glibc 2.3= 4 in ubuntu and running into this issue -- bison segfaults on startup on pp= c64el. There is some talk of 'rebuilding the world' once 2.34 lands= in a distro but that might be hard because I suspect the world might be to= o broken to do that (maybe it's not that bad really... but it doesn'= ;t sound like fun).

Cheers,
mwh

--000000000000d7c84105c6ea3e91--