[PATCH] D18164: [tsan] Do not instrument reads/writes to instruction profile counters.

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 17 13:27:12 PDT 2016

On Thu, Mar 17, 2016 at 1:23 PM, Dmitry Vyukov <dvyukov at google.com> wrote:

> dvyukov added a comment.
> > Sorry it may seem obvious to you, but here is the puzzle: suppose the
> two cases I mentioned produces *identical* code in the final binary -- it
> either has race or not, but not both.  HoweverTsan says it has race if
> produced from one form of IR while no race from another?
> Consider that we have two programs: one overflows int, another overflows
> unsigned. Both programs can potentially produce the same machine code and
> the same result. But the first one still contains a bug that leads to
> undefined behavior of the program. While the second does not.
> The same situations happens with atomic and plain memory accesses. The
> fact that you get correct machine code on a particular version of a
> particular compiler proves nothing in general case. There are well defined
> semantics on language level, and that's what important.
This is a good explanation :)


> http://reviews.llvm.org/D18164
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160317/5633f375/attachment.html>

More information about the llvm-commits mailing list