[PATCH] D40900: [Sanitizers, test] Fix sanitizer tests on Solaris (PR 33274)
Aleksey Shlyapnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 22 10:40:13 PST 2017
alekseyshl accepted this revision.
alekseyshl added inline comments.
This revision is now accepted and ready to land.
================
Comment at: test/asan/TestCases/alloca_loop_unpoisoning.cc:17
+#elif defined(__FreeBSD__) || defined(__NetBSD__)
+#include <stdlib.h>
+#else
----------------
ro wrote:
> krytarowski wrote:
> > <stdlib.h> is included above.
> Missed that, thanks. We can either change the section to
>
> #elif defined(__FreeBSD__) || defined(__NetBSD__)
> -#include <stdlib.h>
> +// alloca is declared in <stdlib.h>.
> #else
> #include <alloca.h>
>
> since the BSDs lack <alloca.h> or add a specific guard
> for alloca.h inclusion.
>
> My general point about moving such code to a common
> test header to avoid duplication in several places still stands.
The common test headers make sense, but as a separate refactoring patch.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D40900
More information about the llvm-commits
mailing list