[llvm-commits] [compiler-rt] r172408 - in /compiler-rt/trunk/lib/sanitizer_common/tests: sanitizer_allocator64_testlib.cc sanitizer_allocator_test.cc sanitizer_list_test.cc

Evgeniy Stepanov eugeni.stepanov at gmail.com
Mon Jan 14 06:20:04 PST 2013


It looks like we got this covered by the TSan build.

On Mon, Jan 14, 2013 at 6:12 PM, Alexey Samsonov <samsonov at google.com> wrote:
>
>
>
> On Mon, Jan 14, 2013 at 6:06 PM, Evgeniy Stepanov
> <eugeni.stepanov at gmail.com> wrote:
>>
>> Author: eugenis
>> Date: Mon Jan 14 08:06:58 2013
>> New Revision: 172408
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=172408&view=rev
>> Log:
>> Remove thread-locals from sanitizer_common tests.
>>
>> Not supported on Android.
>>
>> Modified:
>>
>> compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator64_testlib.cc
>>
>> compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
>>     compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_list_test.cc
>>
>> Modified:
>> compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator64_testlib.cc
>> URL:
>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator64_testlib.cc?rev=172408&r1=172407&r2=172408&view=diff
>>
>> ==============================================================================
>> ---
>> compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator64_testlib.cc
>> (original)
>> +++
>> compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator64_testlib.cc
>> Mon Jan 14 08:06:58 2013
>> @@ -34,7 +34,7 @@
>>  typedef CombinedAllocator<PrimaryAllocator, AllocatorCache,
>>            SecondaryAllocator> Allocator;
>>
>> -static THREADLOCAL AllocatorCache cache;
>> +static AllocatorCache cache;
>>  static Allocator allocator;
>>
>>  static int inited = 0;
>>
>> Modified:
>> compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
>> URL:
>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc?rev=172408&r1=172407&r2=172408&view=diff
>>
>> ==============================================================================
>> ---
>> compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc
>> (original)
>> +++
>> compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_allocator_test.cc Mon
>> Jan 14 08:06:58 2013
>> @@ -386,7 +386,7 @@
>>
>>  template <class AllocatorCache>
>>  void TestSizeClassAllocatorLocalCache() {
>> -  static THREADLOCAL AllocatorCache static_allocator_cache;
>> +  static AllocatorCache static_allocator_cache;
>>    static_allocator_cache.Init();
>>    AllocatorCache cache;
>>    typedef typename AllocatorCache::Allocator Allocator;
>> @@ -438,7 +438,7 @@
>>
>>  #if SANITIZER_WORDSIZE == 64
>>  typedef SizeClassAllocatorLocalCache<Allocator64> AllocatorCache;
>> -static THREADLOCAL AllocatorCache static_allocator_cache;
>> +static AllocatorCache static_allocator_cache;
>>
>>  void *AllocatorLeakTestWorker(void *arg) {
>>    typedef AllocatorCache::Allocator Allocator;
>>
>> Modified:
>> compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_list_test.cc
>> URL:
>> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_list_test.cc?rev=172408&r1=172407&r2=172408&view=diff
>>
>> ==============================================================================
>> --- compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_list_test.cc
>> (original)
>> +++ compiler-rt/trunk/lib/sanitizer_common/tests/sanitizer_list_test.cc
>> Mon Jan 14 08:06:58 2013
>> @@ -21,8 +21,7 @@
>>
>>  typedef IntrusiveList<ListItem> List;
>>
>> -// Check that IntrusiveList can be made thread-local.
>> -static THREADLOCAL List static_list;
>> +static List static_list;
>
>
> Do you think it's worth putting this under #ifdef? I think I've seen some
> reasonable errors that were
> __thread-specific.
>
>>
>>
>>  static void SetList(List *l, ListItem *x = 0,
>>                      ListItem *y = 0, ListItem *z = 0) {
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
>
> --
> Alexey Samsonov, MSK



More information about the llvm-commits mailing list