| #
b85fdc4f |
| 08-Nov-2023 |
Konstantin Varlamov <varconsteq@gmail.com> |
[libc++][hardening] Add `_LIBCPP_ASSERT_NON_NULL` to check for null pointers (#71428)
|
|
Revision tags: llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init |
|
| #
574c5cc9 |
| 05-Jul-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Fix incorrect length check in std::basic_filebuf
This patch fixes an ASAN-found issue in std::basic_filebuf where we'd check the wrong size before proceeding to set our internal buffer to t
[libc++] Fix incorrect length check in std::basic_filebuf
This patch fixes an ASAN-found issue in std::basic_filebuf where we'd check the wrong size before proceeding to set our internal buffer to the externally-provided buffer, leading to the library trying to read from the incorrect buffer in underflow().
Thanks to Andrey Semin for the patch.
Differential Revision: https://reviews.llvm.org/D154514
show more ...
|
| #
c66d0b01 |
| 14-Sep-2023 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Recategorize additional instantiations in the dylib as availability macros
Adding additional instantiations to the dylib isn't actually an ABI break as long as programs targeting an older d
[libc++] Recategorize additional instantiations in the dylib as availability macros
Adding additional instantiations to the dylib isn't actually an ABI break as long as programs targeting an older dylib don't start to depend on them. Making additional instantiations a matter of availability allows us to add them without an ABI break.
Reviewed By: #libc, ldionne, Mordante
Spies: arichardson, ldionne, Mordante, libcxx-commits
Differential Revision: https://reviews.llvm.org/D154796
show more ...
|
| #
c01794e7 |
| 17-Jul-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Move once_flag outside of <mutex>
This allows including once_flag directly from <__locale> instead of depending on all of <mutex>, which requires threading. In turn, this makes it easier to
[libc++] Move once_flag outside of <mutex>
This allows including once_flag directly from <__locale> instead of depending on all of <mutex>, which requires threading. In turn, this makes it easier to support locales on platforms without threading.
Drive-by change: clang-format once_flag.h and use _LIBCPP_HIDE_FROM_ABI
Differential Revision: https://reviews.llvm.org/D155487
show more ...
|
| #
cd0ad421 |
| 27-Jun-2023 |
varconst <varconsteq@gmail.com> |
[libc++][hardening][NFC] Introduce `_LIBCPP_ASSERT_UNCATEGORIZED`.
Replace most uses of `_LIBCPP_ASSERT` with `_LIBCPP_ASSERT_UNCATEGORIZED`.
This is done as a prerequisite to introducing hardened
[libc++][hardening][NFC] Introduce `_LIBCPP_ASSERT_UNCATEGORIZED`.
Replace most uses of `_LIBCPP_ASSERT` with `_LIBCPP_ASSERT_UNCATEGORIZED`.
This is done as a prerequisite to introducing hardened mode to libc++. The idea is to make enabling assertions an opt-in with (somewhat) fine-grained controls over which categories of assertions are enabled. The vast majority of assertions are currently uncategorized; the new macro will allow turning on `_LIBCPP_ASSERT` (the underlying mechanism for all kinds of assertions) without enabling all the uncategorized assertions (in the future; this patch preserves the current behavior).
Differential Revision: https://reviews.llvm.org/D153816
show more ...
|
|
Revision tags: llvmorg-16.0.6 |
|
| #
c352fa74 |
| 05-Jun-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Expand the contents of LIBCXX_ENABLE_FILESYSTEM
Since LIBCXX_ENABLE_FILESYSTEM now truly represents whether the platform supports a filesystem (as opposed to whether the <filesystem> librar
[libc++] Expand the contents of LIBCXX_ENABLE_FILESYSTEM
Since LIBCXX_ENABLE_FILESYSTEM now truly represents whether the platform supports a filesystem (as opposed to whether the <filesystem> library is provided), we can provide a few additional classes from the <filesystem> library even when the platform does not have support for a filesystem. For example, this allows performing path manipulations using std::filesystem::path even on platforms where there is no actual filesystem.
rdar://107061236
Differential Revision: https://reviews.llvm.org/D152382
show more ...
|
| #
dd72b813 |
| 05-Jun-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Rename availability macros for <filesystem>
This makes it clearer that the availability macro only pertains to <filesystem>, and not to whether the platform has support for a file system.
[libc++] Rename availability macros for <filesystem>
This makes it clearer that the availability macro only pertains to <filesystem>, and not to whether the platform has support for a file system.
Differential Revision: https://reviews.llvm.org/D152172
show more ...
|
|
Revision tags: llvmorg-16.0.5 |
|
| #
66a562d2 |
| 31-May-2023 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Roll up fstream support into filesystem support
LIBCXX_ENABLE_FILESYSTEM should represent whether the platform has support for a filesystem, not just whether we support <filesystem>. This p
[libc++] Roll up fstream support into filesystem support
LIBCXX_ENABLE_FILESYSTEM should represent whether the platform has support for a filesystem, not just whether we support <filesystem>. This patch slightly generalizes the setting to also encompass whether we provide <fstream>, since that only makes sense when a filesystem is supported.
Differential Revision: https://reviews.llvm.org/D152168
show more ...
|
| #
140c375a |
| 24-May-2023 |
Nikolas Klauser <nikolasklauser@berlin.de> |
Revert "[libc++] Apply _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION only in classes that we have instantiated externally"
This reverts commit b3c9150062dc4264afb4a3d2790f071c1ebe0743.
There were une
Revert "[libc++] Apply _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION only in classes that we have instantiated externally"
This reverts commit b3c9150062dc4264afb4a3d2790f071c1ebe0743.
There were unexpected breakages downstream. @EricWF is investigating.
show more ...
|
| #
b3c91500 |
| 23-May-2023 |
Nikolas Klauser <n_klauser@apple.com> |
[libc++] Apply _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION only in classes that we have instantiated externally
To make sure all member functions that require it are marked `_LIBCPP_EXCLUDE_FROM_EXP
[libc++] Apply _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION only in classes that we have instantiated externally
To make sure all member functions that require it are marked `_LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION` I compared the output of `objdump --syms lib/libc++.1.0.dylib` before and after, ignoring addresses.
Reviewed By: #libc, ldionne
Spies: Mordante, libcxx-commits, ldionne, arichardson, mstorsjo
Differential Revision: https://reviews.llvm.org/D150896
show more ...
|
|
Revision tags: llvmorg-16.0.4, llvmorg-16.0.3 |
|
| #
9d16cbc5 |
| 20-Apr-2023 |
Mark de Wever <koraq@xs4all.nl> |
[libc++] Adds more forward declaration headers.
The module validation script of D144994 validate whether the contents of an include match its module. An include is the set of files matching the patt
[libc++] Adds more forward declaration headers.
The module validation script of D144994 validate whether the contents of an include match its module. An include is the set of files matching the pattern: - foo - foo/*. - __fwd/foo.h
Several declarations of the stream headers are in the header iosfwd. This gives issue using the validation script. Adding iosfwd to the set of matching files gives too many declarations. For example when validating the fstream header it will pull in declarations of the istream header. Instead if writing a set of filters the headers are granularized into smaller headers containing the expected declarations.
Reviewed By: #libc, ldionne
Differential Revision: https://reviews.llvm.org/D148927
show more ...
|
|
Revision tags: llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init |
|
| #
83ce1397 |
| 23-Jan-2023 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Add hide_from_abi check for classes
We already have a clang-tidy check for making sure that `_LIBCPP_HIDE_FROM_ABI` is on free functions. This patch extends this to class members. The place
[libc++] Add hide_from_abi check for classes
We already have a clang-tidy check for making sure that `_LIBCPP_HIDE_FROM_ABI` is on free functions. This patch extends this to class members. The places where we don't check for `_LIBCPP_HIDE_FROM_ABI` are classes for which we have an instantiation in the library.
Reviewed By: ldionne, Mordante, #libc
Spies: jplehr, mikhail.ramalho, sstefan1, libcxx-commits, krytarowski, miyuki, smeenai
Differential Revision: https://reviews.llvm.org/D142332
show more ...
|
|
Revision tags: llvmorg-15.0.7 |
|
| #
75196f8e |
| 08-Jan-2023 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Remove <cstdlib> includes
We changed the `abort` calls when trying to throw exceptions in `-fno-exceptions` mode to `__verbose_abort` calls, which removes the dependency in most files.
Rev
[libc++] Remove <cstdlib> includes
We changed the `abort` calls when trying to throw exceptions in `-fno-exceptions` mode to `__verbose_abort` calls, which removes the dependency in most files.
Reviewed By: ldionne, #libc
Spies: dim, emaste, mikhail.ramalho, smeenai, libcxx-commits
Differential Revision: https://reviews.llvm.org/D146076
show more ...
|
| #
e8cb3559 |
| 04-Feb-2023 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Move constexpr <cstring> functions into their own headers and remove unused <cstring> includes
Reviewed By: ldionne, Mordante, #libc, #libc_abi
Spies: libcxx-commits
Differential Revision
[libc++] Move constexpr <cstring> functions into their own headers and remove unused <cstring> includes
Reviewed By: ldionne, Mordante, #libc, #libc_abi
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D143329
show more ...
|
| #
b22aa3d7 |
| 02-Feb-2023 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][NFC] Rename _LIBCPP_NO_EXCEPTIONS to _LIBCPP_HAS_NO_EXCEPTIONS
Other macros that disable parts of the library are named `_LIBCPP_HAS_NO_WHATEVER`.
Reviewed By: ldionne, Mordante, #libc
Sp
[libc++][NFC] Rename _LIBCPP_NO_EXCEPTIONS to _LIBCPP_HAS_NO_EXCEPTIONS
Other macros that disable parts of the library are named `_LIBCPP_HAS_NO_WHATEVER`.
Reviewed By: ldionne, Mordante, #libc
Spies: libcxx-commits, smeenai
Differential Revision: https://reviews.llvm.org/D143163
show more ...
|
| #
430b397f |
| 20-Dec-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize <type_traits> includes in <iterator>
Reviewed By: Mordante, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D140621
|
|
Revision tags: llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3 |
|
| #
841399a2 |
| 13-Aug-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Add custom clang-tidy checks
Reviewed By: #libc, ldionne
Spies: jwakely, beanz, smeenai, cfe-commits, tschuett, avogelsgesang, Mordante, sstefan1, libcxx-commits, ldionne, mgorny, arichard
[libc++] Add custom clang-tidy checks
Reviewed By: #libc, ldionne
Spies: jwakely, beanz, smeenai, cfe-commits, tschuett, avogelsgesang, Mordante, sstefan1, libcxx-commits, ldionne, mgorny, arichardson, miyuki
Differential Revision: https://reviews.llvm.org/D131963
show more ...
|
| #
b95379d2 |
| 28-Nov-2022 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++][NFC] Add assertions before calling memmove
Since we're checking preconditions for calling memmove, we might as well do that properly.
Differential Revision: https://reviews.llvm.org/D138798
|
| #
3574b800 |
| 10-Nov-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++][clang-tidy] Enable readability-simplify-boolean-expr
Reviewed By: ldionne, #libc
Spies: Eugene.Zelenko, aheejin, libcxx-commits, xazax.hun
Differential Revision: https://reviews.llvm.org/
[libc++][clang-tidy] Enable readability-simplify-boolean-expr
Reviewed By: ldionne, #libc
Spies: Eugene.Zelenko, aheejin, libcxx-commits, xazax.hun
Differential Revision: https://reviews.llvm.org/D137804
show more ...
|
| #
af8c49dc |
| 18-Nov-2022 |
Louis Dionne <ldionne.2@gmail.com> |
[libc++] Introduce a setting to remove fstream from the library
This allows porting the library to platforms that are able to support <iostream> but that do not have a notion of a filesystem, and wh
[libc++] Introduce a setting to remove fstream from the library
This allows porting the library to platforms that are able to support <iostream> but that do not have a notion of a filesystem, and where it hence doesn't make sense to support std::fstream (and never will).
Also, remove reliance on <fstream> in various tests that didn't actually need it.
Differential Revision: https://reviews.llvm.org/D138327
show more ...
|
| #
59ef4b36 |
| 22-Sep-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Split __allocator_destructor out of shared_ptr.h
Reviewed By: ldionne, huixie90, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D134479
|
| #
89b356f0 |
| 02-Nov-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize <concept> includes
Reviewed By: ldionne, #libc
Spies: libcxx-commits
Differential Revision: https://reviews.llvm.org/D137283
|
| #
d5e26775 |
| 04-Sep-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize the rest of memory
Reviewed By: ldionne, #libc
Spies: vitalybuka, paulkirth, libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D132790
|
| #
bc8fd9c6 |
| 03-Sep-2022 |
Vitaly Buka <vitalybuka@google.com> |
Revert "[libc++] Granularize the rest of memory"
Breaks buildbots.
This reverts commit 30adaa730c4768b5eb06719c808b2884fcf53cf3.
|
| #
30adaa73 |
| 02-Sep-2022 |
Nikolas Klauser <nikolasklauser@berlin.de> |
[libc++] Granularize the rest of memory
Reviewed By: ldionne, #libc
Spies: libcxx-commits, mgorny
Differential Revision: https://reviews.llvm.org/D132790
|