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

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 07:58:20 PST 2015


done in 253216

On Thu, Nov 12, 2015 at 8:02 PM, Kostya Serebryany <kcc at google.com> wrote:
> 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
>
>


More information about the llvm-commits mailing list