[compiler-rt] r300897 - Enable lsan test suite on Darwin x86_64 builds

Francis Ricci via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 20 17:22:01 PDT 2017


Thanks - things didn't fail on my local machine, but I'll attempt to repro
with the buildbot config.

On Thu, Apr 20, 2017, 8:15 PM Ahmed Bougacha <ahmed.bougacha at gmail.com>
wrote:

> Hi Francis,
>
> I reverted this in r300929, as most lsan/asan tests are now failing on
> darwin.
> See e.g.,
> http://green.lab.llvm.org/green/job/clang-stage1-configure-RA_check/30443/
> -Ahmed
> <http://green.lab.llvm.org/green/job/clang-stage1-configure-RA_check/30443/-Ahmed>
>
>
> On Thu, Apr 20, 2017 at 2:27 PM, Francis Ricci via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Author: fjricci
> > Date: Thu Apr 20 16:27:25 2017
> > New Revision: 300897
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=300897&view=rev
> > Log:
> > Enable lsan test suite on Darwin x86_64 builds
> >
> > Reviewers: kubamracek, alekseyshl
> >
> > Subscribers: mgorny, llvm-commits
> >
> > Differential Revision: https://reviews.llvm.org/D32191
> >
> > Modified:
> >     compiler-rt/trunk/cmake/config-ix.cmake
> >     compiler-rt/trunk/test/asan/lit.cfg
> >     compiler-rt/trunk/test/lsan/lit.common.cfg
> >
> > Modified: compiler-rt/trunk/cmake/config-ix.cmake
> > URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=300897&r1=300896&r2=300897&view=diff
> >
> ==============================================================================
> > --- compiler-rt/trunk/cmake/config-ix.cmake (original)
> > +++ compiler-rt/trunk/cmake/config-ix.cmake Thu Apr 20 16:27:25 2017
> > @@ -476,7 +476,7 @@ else()
> >  endif()
> >
> >  if (COMPILER_RT_HAS_SANITIZER_COMMON AND LSAN_SUPPORTED_ARCH AND
> > -    OS_NAME MATCHES "Linux|FreeBSD")
> > +    OS_NAME MATCHES "Darwin|Linux|FreeBSD")
> >    set(COMPILER_RT_HAS_LSAN TRUE)
> >  else()
> >    set(COMPILER_RT_HAS_LSAN FALSE)
> >
> > Modified: compiler-rt/trunk/test/asan/lit.cfg
> > URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/lit.cfg?rev=300897&r1=300896&r2=300897&view=diff
> >
> ==============================================================================
> > --- compiler-rt/trunk/test/asan/lit.cfg (original)
> > +++ compiler-rt/trunk/test/asan/lit.cfg Thu Apr 20 16:27:25 2017
> > @@ -38,6 +38,11 @@ if config.host_os == 'Darwin':
> >    # Also, make sure we do not overwhelm the syslog while testing.
> >    default_asan_opts = 'abort_on_error=0'
> >    default_asan_opts += ':log_to_syslog=0'
> > +
> > +  # On Darwin, leak checking is not enabled by default. Enable for
> x86_64
> > +  # tests to prevent regressions
> > +  if config.target_arch == 'x86_64':
> > +    default_asan_opts += ':detect_leaks=1'
> >  elif config.android:
> >    # The same as on Darwin, we default to "abort_on_error=1" which slows
> down
> >    # testing. Also, all existing tests are using "not" instead of "not
> --crash"
> > @@ -217,7 +222,9 @@ if re.search('mthumb', config.target_cfl
> >    config.available_features.add('fast-unwinder-works')
> >
> >  # Turn on leak detection on 64-bit Linux.
> > -if config.host_os == 'Linux' and (config.target_arch == 'x86_64' or
> config.target_arch == 'i386'):
> > +leak_detection_linux = (config.host_os == 'Linux') and
> (config.target_arch == 'x86_64' or config.target_arch == 'i386')
> > +leak_detection_mac = (config.host_os == 'Darwin') and
> (config.target_arch == 'x86_64')
> > +if leak_detection_linux or leak_detection_mac:
> >    config.available_features.add('leak-detection')
> >
> >  # Set LD_LIBRARY_PATH to pick dynamic runtime up properly.
> >
> > Modified: compiler-rt/trunk/test/lsan/lit.common.cfg
> > URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lsan/lit.common.cfg?rev=300897&r1=300896&r2=300897&view=diff
> >
> ==============================================================================
> > --- compiler-rt/trunk/test/lsan/lit.common.cfg (original)
> > +++ compiler-rt/trunk/test/lsan/lit.common.cfg Thu Apr 20 16:27:25 2017
> > @@ -67,8 +67,10 @@ config.substitutions.append( ("%clangxx
> >  config.substitutions.append( ("%clang_lsan ",
> build_invocation(clang_lsan_cflags)) )
> >  config.substitutions.append( ("%clangxx_lsan ",
> build_invocation(clang_lsan_cxxflags)) )
> >
> > -# LeakSanitizer tests are currently supported on x86-64 Linux, arm
> Linux and mips64 Linux only.
> > -if config.host_os not in ['Linux'] or config.host_arch not in
> ['x86_64', 'mips64', 'arm', 'armhf', 'armv7l']:
> > +# LeakSanitizer tests are currently supported on x86-64 Linux, arm
> Linux, mips64 Linux, and x86_64 Darwin
> > +supported_linux = config.host_os in ['Linux'] and config.host_arch in
> ['x86_64', 'mips64', 'arm', 'armhf', 'armv7l']
> > +supported_darwin = config.host_os is 'Darwin' and config.target_arch is
> 'x86_64'
> > +if not (supported_linux or supported_darwin):
> >    config.unsupported = True
> >
> >  # Don't support Thumb due to broken fast unwinder
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170421/8b97979b/attachment.html>


More information about the llvm-commits mailing list