An ABI incompatibility crept into the libc++ 3.4 import in r261283. It

was caused by upstream libc++ commit r194536, which aimed to make the
headers more standards-compliant, by making std::pair's copy constructor
trivial.  Unfortunately, this could cause certain C++ applications using
shared libraries built against the previous version of libc++ to crash.

Fix the ABI incompatibility by making std::pair's copy constructor
non-trivial again.

Please note: Any C++ applications or shared libraries built with libc++
between r261283 and this revision should be recompiled.

Reported by:	stefanf
MFC after:	3 weeks
X-MFC-With:	r261283
This commit is contained in:
Dimitry Andric 2014-02-12 18:14:49 +00:00
parent f75262579e
commit eed07a2ea1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=261801

View File

@ -567,7 +567,7 @@ template <unsigned> struct __static_assert_check {};
#define _LIBCPP_WCTYPE_IS_MASK
#endif
#if defined(__APPLE__)
#if defined(__APPLE__) || defined(__FreeBSD__)
#ifndef _LIBCPP_TRIVIAL_PAIR_COPY_CTOR
# define _LIBCPP_TRIVIAL_PAIR_COPY_CTOR 0
#endif