<p dir="ltr">Thanks - things didn't fail on my local machine, but I'll attempt to repro with the buildbot config.</p>
<br><div class="gmail_quote"><div dir="ltr">On Thu, Apr 20, 2017, 8:15 PM Ahmed Bougacha <<a href="mailto:ahmed.bougacha@gmail.com">ahmed.bougacha@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Francis,<br>
<br>
I reverted this in r300929, as most lsan/asan tests are now failing on darwin.<br>
See e.g., <a href="http://green.lab.llvm.org/green/job/clang-stage1-configure-RA_check/30443/-Ahmed" rel="noreferrer" target="_blank">http://green.lab.llvm.org/green/job/clang-stage1-configure-RA_check/30443/<br>
-Ahmed</a><br>
<br>
<br>
On Thu, Apr 20, 2017 at 2:27 PM, Francis Ricci via llvm-commits<br>
<<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<br>
> Author: fjricci<br>
> Date: Thu Apr 20 16:27:25 2017<br>
> New Revision: 300897<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=300897&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=300897&view=rev</a><br>
> Log:<br>
> Enable lsan test suite on Darwin x86_64 builds<br>
><br>
> Reviewers: kubamracek, alekseyshl<br>
><br>
> Subscribers: mgorny, llvm-commits<br>
><br>
> Differential Revision: <a href="https://reviews.llvm.org/D32191" rel="noreferrer" target="_blank">https://reviews.llvm.org/D32191</a><br>
><br>
> Modified:<br>
>     compiler-rt/trunk/cmake/config-ix.cmake<br>
>     compiler-rt/trunk/test/asan/lit.cfg<br>
>     compiler-rt/trunk/test/lsan/lit.common.cfg<br>
><br>
> Modified: compiler-rt/trunk/cmake/config-ix.cmake<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=300897&r1=300896&r2=300897&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=300897&r1=300896&r2=300897&view=diff</a><br>
> ==============================================================================<br>
> --- compiler-rt/trunk/cmake/config-ix.cmake (original)<br>
> +++ compiler-rt/trunk/cmake/config-ix.cmake Thu Apr 20 16:27:25 2017<br>
> @@ -476,7 +476,7 @@ else()<br>
>  endif()<br>
><br>
>  if (COMPILER_RT_HAS_SANITIZER_COMMON AND LSAN_SUPPORTED_ARCH AND<br>
> -    OS_NAME MATCHES "Linux|FreeBSD")<br>
> +    OS_NAME MATCHES "Darwin|Linux|FreeBSD")<br>
>    set(COMPILER_RT_HAS_LSAN TRUE)<br>
>  else()<br>
>    set(COMPILER_RT_HAS_LSAN FALSE)<br>
><br>
> Modified: compiler-rt/trunk/test/asan/lit.cfg<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/lit.cfg?rev=300897&r1=300896&r2=300897&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/lit.cfg?rev=300897&r1=300896&r2=300897&view=diff</a><br>
> ==============================================================================<br>
> --- compiler-rt/trunk/test/asan/lit.cfg (original)<br>
> +++ compiler-rt/trunk/test/asan/lit.cfg Thu Apr 20 16:27:25 2017<br>
> @@ -38,6 +38,11 @@ if config.host_os == 'Darwin':<br>
>    # Also, make sure we do not overwhelm the syslog while testing.<br>
>    default_asan_opts = 'abort_on_error=0'<br>
>    default_asan_opts += ':log_to_syslog=0'<br>
> +<br>
> +  # On Darwin, leak checking is not enabled by default. Enable for x86_64<br>
> +  # tests to prevent regressions<br>
> +  if config.target_arch == 'x86_64':<br>
> +    default_asan_opts += ':detect_leaks=1'<br>
>  elif config.android:<br>
>    # The same as on Darwin, we default to "abort_on_error=1" which slows down<br>
>    # testing. Also, all existing tests are using "not" instead of "not --crash"<br>
> @@ -217,7 +222,9 @@ if re.search('mthumb', config.target_cfl<br>
>    config.available_features.add('fast-unwinder-works')<br>
><br>
>  # Turn on leak detection on 64-bit Linux.<br>
> -if config.host_os == 'Linux' and (config.target_arch == 'x86_64' or config.target_arch == 'i386'):<br>
> +leak_detection_linux = (config.host_os == 'Linux') and (config.target_arch == 'x86_64' or config.target_arch == 'i386')<br>
> +leak_detection_mac = (config.host_os == 'Darwin') and (config.target_arch == 'x86_64')<br>
> +if leak_detection_linux or leak_detection_mac:<br>
>    config.available_features.add('leak-detection')<br>
><br>
>  # Set LD_LIBRARY_PATH to pick dynamic runtime up properly.<br>
><br>
> Modified: compiler-rt/trunk/test/lsan/lit.common.cfg<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/lit.common.cfg?rev=300897&r1=300896&r2=300897&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/lit.common.cfg?rev=300897&r1=300896&r2=300897&view=diff</a><br>
> ==============================================================================<br>
> --- compiler-rt/trunk/test/lsan/lit.common.cfg (original)<br>
> +++ compiler-rt/trunk/test/lsan/lit.common.cfg Thu Apr 20 16:27:25 2017<br>
> @@ -67,8 +67,10 @@ config.substitutions.append( ("%clangxx<br>
>  config.substitutions.append( ("%clang_lsan ", build_invocation(clang_lsan_cflags)) )<br>
>  config.substitutions.append( ("%clangxx_lsan ", build_invocation(clang_lsan_cxxflags)) )<br>
><br>
> -# LeakSanitizer tests are currently supported on x86-64 Linux, arm Linux and mips64 Linux only.<br>
> -if config.host_os not in ['Linux'] or config.host_arch not in ['x86_64', 'mips64', 'arm', 'armhf', 'armv7l']:<br>
> +# LeakSanitizer tests are currently supported on x86-64 Linux, arm Linux, mips64 Linux, and x86_64 Darwin<br>
> +supported_linux = config.host_os in ['Linux'] and config.host_arch in ['x86_64', 'mips64', 'arm', 'armhf', 'armv7l']<br>
> +supported_darwin = config.host_os is 'Darwin' and config.target_arch is 'x86_64'<br>
> +if not (supported_linux or supported_darwin):<br>
>    config.unsupported = True<br>
><br>
>  # Don't support Thumb due to broken fast unwinder<br>
><br>
><br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">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>
</blockquote></div>