<div dir="ltr">I had a typo there .. Will fix soon.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 19, 2016 at 10:44 PM, Vedant Kumar <span dir="ltr"><<a href="mailto:vsk@apple.com" target="_blank">vsk@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi David,<br>
<br>
I'm seeing a bot failure after this commit:<br>
<br>
FAILED: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang  -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/compiler-rt/lib/profile -I/Users/buildslave/jenkins/sharedspace/apple-clang-master-RA-stage1-cmake-incremental@2/clang/src/projects/compiler-rt/lib/profile -Iinclude -I/Users/buildslave/jenkins/sharedspace/apple-clang-master-RA-stage1-cmake-incremental@2/clang/src/include -fPIC -Wall -W -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wdelete-non-virtual-dtor -Werror=date-time -fcolor-diagnostics -Wall -O3  -arch i386 -arch x86_64 -arch x86_64h   -UNDEBUG  -mmacosx-version-min=10.4 -MMD -MT projects/compiler-rt/lib/profile/CMakeFiles/clang_rt.profile_osx.dir/InstrProfilingFile.c.o -MF projects/compiler-rt/lib/profile/CMakeFiles/clang_rt.profile_osx.dir/InstrProfilingFile.c.o.d -o projects/compiler-rt/lib/profile/CMakeFiles/clang_rt.profile_osx.dir/InstrProfilingFile.c.o   -c '/Users/buildslave/jenkins/sharedspace/apple-clang-master-RA-stage1-cmake-incremental@2/clang/src/projects/compiler-rt/lib/profile/InstrProfilingFile.c'<br>
<br>
/Users/buildslave/jenkins/sharedspace/apple-clang-master-RA-stage1-cmake-incremental@2/clang/src/projects/compiler-rt/lib/profile/InstrProfilingFile.c:20:10: fatal error: 'malloc.h' file not found<br>
#include <malloc.h><br>
<br>
Not sure why malloc.h isn't on the bots. Any tips?<br>
<br>
vedant<br>
<br>
<br>
> On May 19, 2016, at 9:52 PM, Xinliang David Li via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br>
><br>
> Author: davidxl<br>
> Date: Thu May 19 23:52:27 2016<br>
> New Revision: 270181<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=270181&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=270181&view=rev</a><br>
> Log:<br>
> [profile] Remove anther malloc use<br>
><br>
> Modified:<br>
>    compiler-rt/trunk/lib/profile/InstrProfilingFile.c<br>
><br>
> Modified: compiler-rt/trunk/lib/profile/InstrProfilingFile.c<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingFile.c?rev=270181&r1=270180&r2=270181&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/InstrProfilingFile.c?rev=270181&r1=270180&r2=270181&view=diff</a><br>
> ==============================================================================<br>
> --- compiler-rt/trunk/lib/profile/InstrProfilingFile.c (original)<br>
> +++ compiler-rt/trunk/lib/profile/InstrProfilingFile.c Thu May 19 23:52:27 2016<br>
> @@ -14,6 +14,11 @@<br>
> #include <stdio.h><br>
> #include <stdlib.h><br>
> #include <string.h><br>
> +#ifdef _MSC_VER<br>
> +/* For _alloca */<br>
> +#endif<br>
> +#include <malloc.h><br>
> +<br>
><br>
> #define UNCONST(ptr) ((void *)(uintptr_t)(ptr))<br>
><br>
> @@ -83,10 +88,9 @@ static void truncateCurrentFile(void) {<br>
><br>
>   /* Create the directory holding the file, if needed. */<br>
>   if (strchr(Filename, '/') || strchr(Filename, '\\')) {<br>
> -    char *Copy = malloc(strlen(Filename) + 1);<br>
> +    char *Copy = (char *)COMPILER_RT_ALLOCA(strlen(Filename) + 1);<br>
>     strcpy(Copy, Filename);<br>
>     __llvm_profile_recursive_mkdir(Copy);<br>
> -    free(Copy);<br>
>   }<br>
><br>
>   /* Truncate the file.  Later we'll reopen and append. */<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
<br>
</blockquote></div><br></div>