[PATCH] D31457: [asan] Add strndup/__strndup interceptors if targeting linux.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 1 14:23:33 PDT 2017
eugenis accepted this revision.
eugenis added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: lib/sanitizer_common/tests/sanitizer_test_utils.h:127
+#if defined(__linux__) && !defined(__ANDROID__)
+# define SANITIZER_TEST_HAS_STRNDUP 1
----------------
pgousseau wrote:
> eugenis wrote:
> > filcab wrote:
> > > We should also enter here if `defined(__APPLE__)` and if `defined(__FreeBSD__)`, I think.
> > > Can't think of more OS we support that should be here.
> > >
> > > I'm not sure we should be taking Android out of the picture, as it seems `strndup` is available, AFAICT. @kcc/@vitalybuka (or others who might be working on Android) can you confirm if we should expect `strndup` to be available?
> > Yes, strndup is available on Android.
> Sounds good will do.
maybe simply #if !defined(_MSC_VER)
https://reviews.llvm.org/D31457
More information about the llvm-commits
mailing list