[compiler-rt] r192901 - [ASan] fix assign_large_valloc_to_global.cc to use the correct header for valloc() on OSX.

Kostya Serebryany kcc at google.com
Thu Oct 17 09:26:52 PDT 2013


Thanks!
You could safely just include both headers w/o ifdefs.

--kcc


On Thu, Oct 17, 2013 at 7:48 PM, Alexander Potapenko <glider at google.com>wrote:

> Author: glider
> Date: Thu Oct 17 10:48:24 2013
> New Revision: 192901
>
> URL: http://llvm.org/viewvc/llvm-project?rev=192901&view=rev
> Log:
> [ASan] fix assign_large_valloc_to_global.cc to use the correct header for
> valloc() on OSX.
>
> Modified:
>
> compiler-rt/trunk/lib/asan/lit_tests/TestCases/assign_large_valloc_to_global.cc
>
> Modified:
> compiler-rt/trunk/lib/asan/lit_tests/TestCases/assign_large_valloc_to_global.cc
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/lit_tests/TestCases/assign_large_valloc_to_global.cc?rev=192901&r1=192900&r2=192901&view=diff
>
> ==============================================================================
> ---
> compiler-rt/trunk/lib/asan/lit_tests/TestCases/assign_large_valloc_to_global.cc
> (original)
> +++
> compiler-rt/trunk/lib/asan/lit_tests/TestCases/assign_large_valloc_to_global.cc
> Thu Oct 17 10:48:24 2013
> @@ -1,5 +1,9 @@
>  // Make sure we don't report a leak nor hang.
>  // RUN: %clangxx_asan -O3 %s -o %t && %t
> +#if defined(__APPLE__)
> +#include <stdlib.h>
> +#else
>  #include <malloc.h>
> +#endif
>  int *p = (int*)valloc(1 << 20);
>  int main() { }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131017/9bd170c4/attachment.html>


More information about the llvm-commits mailing list