From 5f19afe7fa9c6f0c5b6c13890006b8d76086c405 Mon Sep 17 00:00:00 2001 From: Philip Pronin Date: Tue, 10 Sep 2013 06:25:53 -0700 Subject: [PATCH] disable asan for qfind_first_byte_of_needles16 Summary: It's expected to read past the string (within the same memory page). Test Plan: . Reviewed By: tudorb@fb.com FB internal diff: D962974 --- folly/Range.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/folly/Range.cpp b/folly/Range.cpp index 377e293c..c343a362 100644 --- a/folly/Range.cpp +++ b/folly/Range.cpp @@ -77,7 +77,8 @@ inline size_t nextAlignedIndex(const char* arr) { // build sse4.2-optimized version even if -msse4.2 is not passed to GCC size_t qfind_first_byte_of_needles16(const StringPiece& haystack, const StringPiece& needles) - __attribute__ ((__target__("sse4.2"), noinline)); + __attribute__ ((__target__("sse4.2"), noinline)) + FOLLY_DISABLE_ADDRESS_SANITIZER; // helper method for case where needles.size() <= 16 size_t qfind_first_byte_of_needles16(const StringPiece& haystack, -- 2.34.1