Skip to content

Commit b77f871

Browse files
committed
Fix UninitializedMemoryHacks.h check for asan wtih libc++
Checks were updated from _LIBCPP_HAS_NO_ASAN to _LIBCPP_HAS_ASAN Relevant change: llvm/llvm-project#89178
1 parent 13c5f04 commit b77f871

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

folly/memory/UninitializedMemoryHacks.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ void unsafeVectorSetLargerSize(std::vector<T>& v, std::size_t n) {
355355
// enabled we need to call the appropriate annotation functions in order to
356356
// stop ASAN from reporting false positives. When ASAN is disabled, the
357357
// annotation function is a no-op.
358-
#ifndef _LIBCPP_HAS_NO_ASAN
358+
#if defined(_LIBCPP_HAS_ASAN) ? _LIBCPP_HAS_ASAN : !defined(_LIBCPP_HAS_NO_ASAN)
359359
__sanitizer_annotate_contiguous_container(
360360
v.data(), v.data() + v.capacity(), v.data() + s, v.data() + n);
361361
#endif

0 commit comments

Comments
 (0)