[compiler-rt] r252892 - tsan: disable abort_on_error for Go

Kostya Serebryany via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 12 11:02:51 PST 2015


Can we have if (SANITIZER_GO) instead of "#if SANITIZER_GO" here?
I know it is not always possible, but here it should be.

On Thu, Nov 12, 2015 at 6:03 AM, Dmitry Vyukov via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: dvyukov
> Date: Thu Nov 12 08:03:20 2015
> New Revision: 252892
>
> URL: http://llvm.org/viewvc/llvm-project?rev=252892&view=rev
> Log:
> tsan: disable abort_on_error for Go
>
> It does not work as expected.
> Go runtime handles SIGABRT and crashes with a loud message.
>
>
> Modified:
>     compiler-rt/trunk/lib/tsan/rtl/tsan_flags.cc
>
> Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_flags.cc
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_flags.cc?rev=252892&r1=252891&r2=252892&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/lib/tsan/rtl/tsan_flags.cc (original)
> +++ compiler-rt/trunk/lib/tsan/rtl/tsan_flags.cc Thu Nov 12 08:03:20 2015
> @@ -61,7 +61,11 @@ void InitializeFlags(Flags *f, const cha
>      CommonFlags cf;
>      cf.CopyFrom(*common_flags());
>      cf.allow_addr2line = true;
> -#ifndef SANITIZER_GO
> +#ifdef SANITIZER_GO
> +    // Does not work as expected for Go: runtime handles SIGABRT and
> crashes.
> +    cf.abort_on_error = false;
> +    // Go does not have mutexes.
> +#else
>      cf.detect_deadlocks = true;
>  #endif
>      cf.print_suppressions = false;
>
>
> _______________________________________________
> 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/20151112/e739f1ac/attachment.html>


More information about the llvm-commits mailing list