From owner-svn-src-head@freebsd.org Wed Aug 21 16:02:01 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1D7FDCC65F; Wed, 21 Aug 2019 16:02:01 +0000 (UTC) (envelope-from mclow.lists@gmail.com) Received: from mail-vs1-xe29.google.com (mail-vs1-xe29.google.com [IPv6:2607:f8b0:4864:20::e29]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46DC8m71Dpz47P4; Wed, 21 Aug 2019 16:02:00 +0000 (UTC) (envelope-from mclow.lists@gmail.com) Received: by mail-vs1-xe29.google.com with SMTP id i128so1720020vsc.7; Wed, 21 Aug 2019 09:02:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5UdbzTow5/mXNO03bJS7WeaJSWN9Eht+8sSN+1eDm88=; b=I5bU7Co3IszA01oTHzkxhpfyOlT/y0rO2SpJIAEkwphGPJzPY2cCJWJ9x/AUUnU8XO mkUCSm4JMgw8Q66PHdz0sgqf92OS9hBTE3ws6IANVRlpBvCypDn+8pygSE+x3g/sFLAr HFVniXbG5KBIORi8aSQL+EQbR5qwXU86ibDA+DtJmplpWCn8ozpj7pGi0alk+MmP0khd GDpFim9PjftdTHJfWfl3nJNeBSvPVrYR167rJcDejOms4KM9uLxaOhmQUgUZNZquOo/f v7PxW2/JZcrVXQFjIsZMeSRpO0WSydE/DCwPn164e6a+fhk2rijAq8HJLGerYH28PtcT o4Ow== 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=5UdbzTow5/mXNO03bJS7WeaJSWN9Eht+8sSN+1eDm88=; b=TP9TS5Q4J/D3tUTHoKZlkRel+mE7IG0/BANRkJ6XITOMxdFCqrqeM2HCZzoOeyyuLK M5OrFYW7i+OKtLDAxAsXGJeOheeSputdKw5SfI8LygnWYb1sBl3U+sC7mei9eBvyGA7Y JlDgVvbZA9tS72Hyy7Rk/LJNundt0wUVwWmBc4yn8h2hGa8VdND6qcvcCLs8qQJd3Php 5cNrV1p2DBoRTx96VDddeIF/REElaQCKRieNjpCpup9AJ9K6NWgWoyWUpr9kT+ycgEW1 Ry5lBB31B3/CBHLTKvPp+QjktPe8sIGevqJmPzXGAffLBt6RsdNVh/VRLJ+qnMdGq/T+ ShqA== X-Gm-Message-State: APjAAAUgBf4VMcLYmiXo9eJYVkElbbtaNvZztwcj5cMV9mexeXbX5MAN HHcfXxVzyp5BeJwVEFRLA16LAzzR5F5TK1W2EFENdQ== X-Google-Smtp-Source: APXvYqx93Z/Aij0qB53lKm2I1/PVex3dS9dsFDVrX8gUMHoNpwvAMVb37Pd5AFZeniKVTiErEIP/k55PBNVdcLFauB8= X-Received: by 2002:a67:fc14:: with SMTP id o20mr14403200vsq.160.1566403319556; Wed, 21 Aug 2019 09:01:59 -0700 (PDT) MIME-Version: 1.0 References: <201908201739.x7KHdXvv054610@repo.freebsd.org> <20190821144908.7137e6bc@FreeBSD.org> <20190821151949.00c9845c@FreeBSD.org> In-Reply-To: <20190821151949.00c9845c@FreeBSD.org> From: Marshall Clow Date: Wed, 21 Aug 2019 09:01:48 -0700 Message-ID: Subject: Re: svn commit: r351253 - in head/contrib/libc++: include src To: =?UTF-8?Q?T=C4=B3l_Coosemans?= Cc: Dimitry Andric , src-committers , svn-src-all , svn-src-head@freebsd.org X-Rspamd-Queue-Id: 46DC8m71Dpz47P4 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.98 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.982,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; TAGGED_FROM(0.00)[] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2019 16:02:01 -0000 On Wed, Aug 21, 2019 at 6:20 AM T=C4=B3l Coosemans wrote= : > On Wed, 21 Aug 2019 15:07:56 +0200 Dimitry Andric > wrote: > > On 21 Aug 2019, at 14:49, T=C4=B3l Coosemans wrote: > >> On Tue, 20 Aug 2019 17:39:33 +0000 (UTC) Dimitry Andric > >> wrote: > >>> Author: dim > >>> Date: Tue Aug 20 17:39:32 2019 > >>> New Revision: 351253 > >>> URL: https://svnweb.freebsd.org/changeset/base/351253 > >>> > >>> Log: > >>> Pull in r368867 from upstream libc++ trunk (by Marshall Clow): > >>> > >>> Rework recursive_timed_mutex so that it uses __thread_id instead o= f > >>> using the lower-level __libcpp_thread_id. This is prep for fixing > >>> PR42918. Reviewed as https://reviews.llvm.org/D65895 > >>> > >>> Pull in r368916 from upstream libc++ trunk (by Marshall Clow): > >>> > >>> Fix thread comparison by making sure we never pass our special 'no= t > a > >>> thread' value to the underlying implementation. Fixes PR#42918. > >>> > >>> This should fix std::thread::id::operator=3D=3D() attempting to call > >>> pthread_equal(3) with zero values. > > ... > >> This seems to break building Firefox: > >> > >> In file included from > /usr/ports/www/firefox/work/firefox-68.0.2/media/mtransport/nricectx.cpp:= 82: > >> In file included from > /usr/ports/www/firefox/work/firefox-68.0.2/media/mtransport/third_party/n= ICEr/src/stun/stun_client_ctx.h:41: > >> In file included from > /usr/ports/www/firefox/work/firefox-68.0.2/media/mtransport/third_party/n= ICEr/src/stun/stun.h:45: > >> In file included from /usr/include/net/if_var.h:84: > >> /usr/include/sys/lock.h:68:15: error: reference to 'thread' is ambiguo= us > >> struct thread **owner); > >> ^ > >> /usr/include/sys/lock.h:42:8: note: candidate found by name lookup is > 'thread' > >> struct thread; > >> ^ > >> /usr/include/c++/v1/__threading_support:397:24: note: candidate found > by name > >> lookup is 'std::__1::thread' > >> class _LIBCPP_TYPE_VIS thread; > >> ^ > >> > >> This "class thread" conflicts with "struct thread" in sys/lock.h. > >> Should everything in sys/lock.h be under #ifdef _KERNEL? > > > > Maybe, but is Firefox using "using namespace std;" here? It is a likel= y > > explanation for the ambiguity between the global struct thread from > > sys/lock.h, and std::thread from libc++. > > Yes, several headers in media/mtransport/third_party/nICEr/src start > with: > > #ifdef __cplusplus > using namespace std; > extern "C" { > #endif /* __cplusplus */ > libc++ has always had a `std::thread` struct. The change here is that forward declaration moved from to <__threading_support>, and that was included by . -- Marshall