svn commit: r351253 - in head/contrib/libc++: include src

Tijl Coosemans tijl at FreeBSD.org
Wed Aug 21 12:49:13 UTC 2019


On Tue, 20 Aug 2019 17:39:33 +0000 (UTC) Dimitry Andric
<dim at FreeBSD.org> 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.
>   
>   Reported by:	andrew at tao11.riddles.org.uk
>   PR:		239038, 239550
>   MFC after:	3 days
> 
> Modified:
>   head/contrib/libc++/include/__threading_support
>   head/contrib/libc++/include/mutex
>   head/contrib/libc++/include/thread
>   head/contrib/libc++/src/mutex.cpp
> 
> Modified: head/contrib/libc++/include/__threading_support
> ==============================================================================
> --- head/contrib/libc++/include/__threading_support	Tue Aug 20 17:00:31 2019	(r351252)
> +++ head/contrib/libc++/include/__threading_support	Tue Aug 20 17:39:32 2019	(r351253)
> @@ -13,6 +13,7 @@
>  
>  #include <__config>
>  #include <chrono>
> +#include <iosfwd>
>  #include <errno.h>
>  
>  #ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
> @@ -392,6 +393,86 @@ int __libcpp_tls_set(__libcpp_tls_key __key, void *__p
>  }
>  
>  #endif // !_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL || _LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL
> +
> +class _LIBCPP_TYPE_VIS thread;

This seems to break building Firefox:

In file included from /home/root/obj/ports/home/tijl/projects/freebsd/ports/head/www/firefox/work/firefox-68.0.2/media/mtransport/nricectx.cpp:82:
In file included from /home/root/obj/ports/home/tijl/projects/freebsd/ports/head/www/firefox/work/firefox-68.0.2/media/mtransport/third_party/nICEr/src/stun/stun_client_ctx.h:41:
In file included from /home/root/obj/ports/home/tijl/projects/freebsd/ports/head/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?


More information about the svn-src-all mailing list