-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

=============================================================================
FreeBSD-EN-21:18.libc++                                         Errata Notice
                                                          The FreeBSD Project

Topic:          Missing C++20 headers in libc++

Category:       contrib
Module:         libc++
Announced:      2021-06-29
Affects:        FreeBSD 13.0
Corrected:      2021-06-03 18:53:18 UTC (stable/13, 13.0-STABLE)
                2021-06-29 17:08:58 UTC (releng/13.0, 13.0-RELEASE-p3)

For general information regarding FreeBSD Errata Notices and Security
Advisories, including descriptions of the fields above, security
branches, and the following sections, please visit
<URL:https://security.FreeBSD.org/>.

I.   Background

libc++ is an implementation of the C++ Standard Library, provided by the
LLVM project. It is used by C++ programs in the base system, and also by
many C++ programs in the ports collection. 

II.  Problem Description

The LLVM project components in the base system, including libc++, were
(2020-07-31) upgraded to upstream version 11.0.0. Among other features,
improvements were made to libc++ to better support the C++20 standard. This
also included a number of new Standard Library headers, but these were
missed during the upgrade and not installed into the base system, in
particular:

* <barrier>
* <concepts>
* <execution>
* <latch>
* <numbers>
* <semaphore>

III. Impact

Even though clang and libc++ 11.0.0 have much improved support for the
C++20 standard, it is not possible to build programs using the standard
headers listed above, because they are not available in the base system.

IV.  Workaround

No workaround is available.

V.   Solution

Upgrade your system to a supported FreeBSD stable or release / security
branch (releng) dated after the correction date.

Perform one of the following:

1) To update your system via a binary patch:

Systems running a RELEASE version of FreeBSD on the amd64, i386, or
(on FreeBSD 13 and later) arm64 platforms can be updated via the
freebsd-update(8) utility:

# freebsd-update fetch
# freebsd-update install

2) To update your system via a source code patch:

The following patches have been verified to apply to the applicable
FreeBSD release branches.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

# fetch https://security.FreeBSD.org/patches/EN-21:18/libc++.patch
# fetch https://security.FreeBSD.org/patches/EN-21:18/libc++.patch.asc
# gpg --verify libc++.patch.asc

b) Apply the patch.  Execute the following commands as root:

# cd /usr/src
# patch < /path/to/patch

c) Recompile the operating system using buildworld and installworld as
described in <URL:https://www.FreeBSD.org/handbook/makeworld.html>.

VI.  Correction details

This issue is corrected by the corresponding Git commit hash or Subversion
revision number in the following stable and release branches:

Branch/path                             Hash                     Revision
- -------------------------------------------------------------------------
stable/13/                              70e13c4cffd5    stable/13-n245875
releng/13.0/                            dac086497e50  releng/13.0-n244747
- -------------------------------------------------------------------------

Run the following command to see which files were modified by a
particular commit:

# git show --stat <commit hash>

Or visit the following URL, replacing NNNNNN with the hash:

<URL:https://cgit.freebsd.org/src/commit/?id=NNNNNN>

To determine the commit count in a working tree (for comparison against
nNNNNNN in the table above), run:

# git rev-list --count --first-parent HEAD

VII. References

<URL:https://en.cppreference.com/w/cpp/header/barrier>
<URL:https://en.cppreference.com/w/cpp/header/concepts>
<URL:https://en.cppreference.com/w/cpp/header/execution>
<URL:https://en.cppreference.com/w/cpp/header/latch>
<URL:https://en.cppreference.com/w/cpp/header/numbers>
<URL:https://en.cppreference.com/w/cpp/header/semaphore>

<URL:https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=255374>

The latest revision of this advisory is available at
<URL:https://security.FreeBSD.org/advisories/FreeBSD-EN-21:18.libc++.asc>
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE/A6HiuWv54gCjWNV05eS9J6n5cIFAmDcD0QACgkQ05eS9J6n
5cKVZg//Ro5nAZ7q23Uf4LlZchlADS8BlH6rHxJ2sk2784CJl4q0Lrh1UMcttfg6
JA8xfbNV2YXLIzUaXemCfzJAOwCfuNSZkU4hJ568eqo5/itpRf5uQ6hXIwlmmYKw
9Sk8ciUAxO4HuxLxKRDEPsHWSSQE04SnGyQk82AXCpxn/0nTeQoeKj1wyPHBf8F+
Kj0kl30l9JKpnoXgHfvyTvK2akJAXbH1v+pc72kyjVBhy8HWKAtsbyC7vYbELylB
XuH2IwxAVf1iR3VG7slUlr/L/XcGniICRzmYoY1A/SW6QalEfLDPtZLujl33HMOE
xyni4+oi7JsbgwVc/ISNfqwtyZePSD8RCczLNrZb+femGz/iyGwq1fPn8w0H5snp
NYrQ22HnjIR5E6Tqlx4IdVFC0M9JQjmEp9cTjG+9CM6L0qZLStdzYbGlJsG2qz0o
hBc3gvMGZzP2uBG8VxaIH3FBZGgMllsN0/uaOvqipZyqA8t4OR56bF5/AEGxLuJY
MPdMBMKNDvIpLKe9CEJ9A6BpAO3aPWnRKgAGKlV69t1wub0GWeAAFHz70JQC0Kgv
6q5xuCjzzGydIeZdv34uSkVThB+vv4OgpdH806ZZLjSr90kfzYJsRYDTNxRBdKpR
etU1E7FFJAxl9Qc2gXadEvDhi4IhKslBdtlQFIZvkoO8Wd4VhHM=
=vLEs
-----END PGP SIGNATURE-----
