This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix parameters of __tsan_vptr_update


Hi,

Sorry for the delay, I was on a vacation. Is here anything to do/review for me?


On Sun, Jan 11, 2015 at 4:15 PM, Bernd Edlinger
<bernd.edlinger@hotmail.de> wrote:
> Hi,
>
>
>
> On Sun, 4 Jan 2015 14:54:56, Bernd Edlinger wrote:
>>
>> Hi Jakub,
>>
>>
>> I think I have found a reasonable test case, see the attached patch file.
>> The use case is: a class that destroys an owned thread in the destructor.
>> The destructor sets the vptr again to thread::vptr but this should
>> _not_ trigger a diagnostic message, when the vptr does not really change.
>>
>> Jakub, this is another test case where the TREE_READONLY prevents
>> the tsan instrumentation.  So I had first to install your patch:
>>
>> https://gcc.gnu.org/ml/gcc-patches/2014-12/msg01432.html
>>
>> ... to see the test case fail without my patch.
>>
>
> that has been installed in the meantime.
>
>> The patch installs cleanly on 4.9 and 4.8, however the 4.8 branch
>> has no tsan tests, so I would leave the test case away for 4.8.
>>
>
> I found, 4.8 does not have BT_FN_VOID_PTR_PTR, and no tsan tests
> at all, so it is probably not worth the effort.
>
>> Boot-strapped and regression-tested on x86_64-linux-gnu
>> OK for trunk and 4.9 + 4.8 branches?
>>
>>
>> Thanks
>> Bernd.
>>
>>
>
> I found some test cases in the clang tree, about the __tsan_vptr_update.
> So I thought I should use these instead of inventing new ones.
>
> Attached you'll find an updated patch with one positive and one negative
> test for vptr races.
>
> Tested with x86_64-linux-gnu.
> OK for trunk and 4.9 after a while?
>
>
> Thanks
> Bernd.
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]