Commit 5b44809e authored by Orvid King's avatar Orvid King Committed by Facebook GitHub Bot

Guard call to weak __asan_region_is_poisoned properly

Summary:
It wasn't guarded at all, which is causing issues for non-sanitizer builds on platforms without shared library support.

Ref: https://github.com/facebook/folly/issues/1507

Reviewed By: meyering

Differential Revision: D25970872

fbshipit-source-id: f710e752fdf8ebc5529314d335f4559e690b787a
parent 66f614d7
......@@ -21,13 +21,15 @@
extern "C" FOLLY_ATTR_WEAK void* __asan_region_is_poisoned(void*, std::size_t);
namespace folly {
namespace detail {
void* asan_region_is_poisoned_(void* const ptr, std::size_t len) {
if (kIsLibrarySanitizeAddress) {
return __asan_region_is_poisoned(ptr, len);
} else {
return nullptr;
}
}
} // namespace detail
} // namespace folly
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment