Skip to content

Commit

Permalink
Revert "[ASan][libc++] String annotations optimizations fix with lamb…
Browse files Browse the repository at this point in the history
…da (llvm#76200)"

This reverts commit c68a9d2.
  • Loading branch information
AdvenamTacet authored and justinfargnoli committed Jan 28, 2024
1 parent 19e4d3d commit b33b44b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcxx/include/string
Expand Up @@ -922,7 +922,7 @@ public:
// Turning off ASan instrumentation for variable initialization with _LIBCPP_STRING_INTERNAL_MEMORY_ACCESS
// does not work consistently during initialization of __r_, so we instead unpoison __str's memory manually first.
// __str's memory needs to be unpoisoned only in the case where it's a short string.
: __r_([](basic_string &__s){ if(!__s.__is_long()) __s.__annotate_delete(); return std::move(__s.__r_); }(__str)) {
: __r_(((__str.__is_long() ? 0 : (__str.__annotate_delete(), 0)), std::move(__str.__r_))) {
__str.__r_.first() = __rep();
__str.__annotate_new(0);
if (!__is_long())
Expand Down

0 comments on commit b33b44b

Please sign in to comment.