From owner-svn-src-stable@freebsd.org Sat Feb 18 14:44:15 2017 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E67ECCE3C7D; Sat, 18 Feb 2017 14:44:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEB681E74; Sat, 18 Feb 2017 14:44:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1IEiEw7048640; Sat, 18 Feb 2017 14:44:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1IEiE03048639; Sat, 18 Feb 2017 14:44:14 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201702181444.v1IEiE03048639@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sat, 18 Feb 2017 14:44:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r313916 - in stable: 10/contrib/libc++/include 9/contrib/libc++/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Feb 2017 14:44:16 -0000 Author: dim Date: Sat Feb 18 14:44:14 2017 New Revision: 313916 URL: https://svnweb.freebsd.org/changeset/base/313916 Log: Pull in r242377 from upstream libc++ trunk (by Marshall Clow): Make sure that __libcpp_compressed_pair_imp default-constructs its' members, rather than value-initializing them. Fixes PR#24137 This ensures std::make_shared<>'s default constructor properly initializes to zero. Direct commit to stable/9 and stable/10, since stable/11 and head already have a newer version of libc++, including this fix. Reported by: martin.beran@kernun.cz PR: 217200 Modified: stable/10/contrib/libc++/include/memory Changes in other areas also in this revision: Modified: stable/9/contrib/libc++/include/memory Modified: stable/10/contrib/libc++/include/memory ============================================================================== --- stable/10/contrib/libc++/include/memory Sat Feb 18 11:43:13 2017 (r313915) +++ stable/10/contrib/libc++/include/memory Sat Feb 18 14:44:14 2017 (r313916) @@ -1950,11 +1950,11 @@ public: typedef const typename remove_reference<_T1>::type& _T1_const_reference; typedef const typename remove_reference<_T2>::type& _T2_const_reference; - _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() {} + _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() : __first_(), __second_() {} _LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T1_param __t1) - : __first_(_VSTD::forward<_T1_param>(__t1)) {} + : __first_(_VSTD::forward<_T1_param>(__t1)), __second_() {} _LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T2_param __t2) - : __second_(_VSTD::forward<_T2_param>(__t2)) {} + : __first_(), __second_(_VSTD::forward<_T2_param>(__t2)) {} _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2) : __first_(_VSTD::forward<_T1_param>(__t1)), __second_(_VSTD::forward<_T2_param>(__t2)) {} @@ -2043,9 +2043,9 @@ public: typedef const _T1& _T1_const_reference; typedef const typename remove_reference<_T2>::type& _T2_const_reference; - _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() {} + _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() : __second_() {} _LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T1_param __t1) - : _T1(_VSTD::forward<_T1_param>(__t1)) {} + : _T1(_VSTD::forward<_T1_param>(__t1)), __second_() {} _LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T2_param __t2) : __second_(_VSTD::forward<_T2_param>(__t2)) {} _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2) @@ -2133,11 +2133,11 @@ public: typedef const typename remove_reference<_T1>::type& _T1_const_reference; typedef const _T2& _T2_const_reference; - _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() {} + _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp() : __first_() {} _LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T1_param __t1) : __first_(_VSTD::forward<_T1_param>(__t1)) {} _LIBCPP_INLINE_VISIBILITY explicit __libcpp_compressed_pair_imp(_T2_param __t2) - : _T2(_VSTD::forward<_T2_param>(__t2)) {} + : _T2(_VSTD::forward<_T2_param>(__t2)), __first_() {} _LIBCPP_INLINE_VISIBILITY __libcpp_compressed_pair_imp(_T1_param __t1, _T2_param __t2) _NOEXCEPT_(is_nothrow_move_constructible<_T1>::value && is_nothrow_move_constructible<_T2>::value)