From owner-svn-src-all@freebsd.org Wed Aug 21 16:47:17 2019 Return-Path: Delivered-To: svn-src-all@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 9BD5FCE1F0 for ; Wed, 21 Aug 2019 16:47:17 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46DD911T25z4CvP for ; Wed, 21 Aug 2019 16:47:16 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1566406035; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=VudpuNK5ZBwLJAfcfJ8oNTEQqL1CBgyQG3tfvCXa9qvR1GezNBAd89tUGDSKjAXxGcJ/wLDOpet87 AXGulIhm6IL1gqjb+uYikF3AePmDQmAHM10w24mIbFWNMRBjqCEfP7lmgMc80f3+hP7McotlgwwUes cSsgBbNFlPoWYb/IbEQRHt+woqsxlEWi4eN4LqtwCQtGHUDSutKOgsOe70Fv6JL4rQ2fBhK8YkLXBo wE5tNJc8uZOyINuxW9KD4t2oDBoLokhVgdNetNgJntIK2meRZIv79EbJ/U0cR0FD7FLUkAM+cYEAW1 dNDA83c1Q7CFdPtFdvWDxBDdv8LZQxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=vQ2KC4pbh1V1SPTtlTq4b+QhnPG98/d8uu8BatM3KHA=; b=q4LlDGLMFLuKt8D2UZ31lJcgFKNKbBtlNdNSHBdgtq24++UdkWV3xWTLVMxc2noJgkjP/hbG4zVJF LX5FmaboVGcqNk7cYXbMp/zLnFdRvqnFBTCDNimL/ancMFErjm4258nwn0ViKui/lW+qS7+Ee0Edqf 4/jh1aNNFUJcuXTpG+B2wzhtd0rnZ1cZl1jJRRnYFHhJ/Wx+3NqNgNT8v/v4DN6CFIAOl/zOcFjqv7 ZMSa2SArT+nZKx+x+f7GXAnNaFpI2EMrYZQE3z9RKc5y86oCbOr/yQ5JALN7ER0vrKBjp9P2gX5oge PSXkn8Vi+HN9r2DHlV3RXalOhoNkS8w== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=vQ2KC4pbh1V1SPTtlTq4b+QhnPG98/d8uu8BatM3KHA=; b=dyfAS81Racvni55bJtPLS2rtrzzscXoH19AQJ2M2ptbKNf/YvF0ih9cS/WlCybsJLE27/A2HK9Wyg iJBoq78A+nC3gjTd5uI/R++3RI+jhCIkMFEC23ZqICkp638UKyzb0lvohnIQOGiA1W18NT9qme3DB6 jb1yaEgZN1quChXklCFbmMTJRq0O1dSERrYYY5nCq6ZUuQVrJHxtmnAu6z71U0l+OcqVuyOSGTCUW/ oxAnGshHebRCMwPRb+5ino54Fd9XB+pax4BzVS3HY85HdxaZMcrpRxpX75zE6ufQym0RAithnV8NZU BjHhJ08u4mTj7iib9Hq7lW2mjU+iTTQ== X-MHO-RoutePath: aGlwcGll X-MHO-User: 53752a5b-c433-11e9-85ec-13b9aae3a1d2 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 53752a5b-c433-11e9-85ec-13b9aae3a1d2; Wed, 21 Aug 2019 16:47:14 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x7LGlDrN084700; Wed, 21 Aug 2019 10:47:13 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <2722bd2586be8b60720bd634238e63f629b60c50.camel@freebsd.org> Subject: Re: svn commit: r351253 - in head/contrib/libc++: include src From: Ian Lepore To: Marshall Clow , T Coosemans Cc: Dimitry Andric , src-committers , svn-src-all , svn-src-head@freebsd.org Date: Wed, 21 Aug 2019 10:47:13 -0600 In-Reply-To: References: <201908201739.x7KHdXvv054610@repo.freebsd.org> <20190821144908.7137e6bc@FreeBSD.org> <20190821151949.00c9845c@FreeBSD.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 46DD911T25z4CvP X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TAGGED_RCPT(0.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.981,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Aug 2019 16:47:17 -0000 On Wed, 2019-08-21 at 09:01 -0700, Marshall Clow wrote: > On Wed, Aug 21, 2019 at 6:20 AM Tijl Coosemans > wrote: > > > On Wed, 21 Aug 2019 15:07:56 +0200 Dimitry Andric > > wrote: > > > On 21 Aug 2019, at 14:49, Tijl 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 of > > > > > 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 'not > > > > a > > > > > thread' value to the underlying implementation. Fixes > > > > > PR#42918. > > > > > > > > > > This should fix std::thread::id::operator==() 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/nICEr/src/stun/stun_client_ctx. > > h:41: > > > > In file included from > > > > /usr/ports/www/firefox/work/firefox- > > 68.0.2/media/mtransport/third_party/nICEr/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 > > > > ambiguous > > > > 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 > > > likely > > > 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 . > > It doesn't matter what the change was, because the error is in firefox. It violates the c++ convention that you NEVER put 'using namespace' statements in a header file. Never. Because, this stuff happens if you do. -- Ian