Skip to content

Commit 1215a57

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 936b75c commit 1215a57

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
@@ -332,7 +332,7 @@ void unsafeVectorSetLargerSize(std::vector<T>& v, std::size_t n) {
332332
// enabled we need to call the appropriate annotation functions in order to
333333
// stop ASAN from reporting false positives. When ASAN is disabled, the
334334
// annotation function is a no-op.
335-
#ifndef _LIBCPP_HAS_NO_ASAN
335+
#if defined(_LIBCPP_HAS_ASAN) ? _LIBCPP_HAS_ASAN : !defined(_LIBCPP_HAS_NO_ASAN)
336336
__sanitizer_annotate_contiguous_container(
337337
v.data(), v.data() + v.capacity(), v.data() + s, v.data() + n);
338338
#endif

0 commit comments

Comments
 (0)