KKonstantin Varlamov[libc++][hardening] Categorize more assertions.
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc++][hardening] Categorize more assertions. Differential Revision: https://reviews.llvm.org/D155873 | 2 年前 | |
[libc++] Fix std::move algorithm with trivial move-only types As reported in https://reviews.llvm.org/D151953#4472195, the std::move algorithm (and various other functions that relied on it) stopped working after starting to use __constexpr_memmove in its implementation. This patch fixes the underlying issue in __constexpr_memmove and adds tests for various related algorithms and functions that were not exercising trivial move-only types. Differential Revision: https://reviews.llvm.org/D154613 | 2 年前 | |
[libc++] Set correct size at the end of growing std::string This commit deprecates std::basic_string::__grow_by, which is part of ABIv1. The function is replaced by std::basic_string:__grow_by_without_replace, which is not part of ABI. - The original function __grow_by is deprecated because it does not set the string size, therefore it may not update the size when the size is changed, and it may also not set the size at all when the string was short initially. This leads to unpredictable size value. It is not removed or changed to avoid breaking the ABI. - The commit adds _LIBCPP_HIDE_FROM_ABI guarded by _LIBCPP_ABI_VERSION >= 2 to __grow_by. This allows the function to be used in the dylib in ABIv1 without raising the [abi:v170000] error and removes it from future ABIs. _LIBCPP_HIDE_FROM_ABI_AFTER_V1 cannot be used. - Additionally, __grow_by has been removed from _LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST in libcxx/include/__string/extern_template_lists.h. This bugfix is necessary to implement string ASan annotations, because it mitigates the problems encountered in D132769. Reviewed By: ldionne, #libc, philnik Differential Revision: https://reviews.llvm.org/D148693 | 2 年前 |