From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20383 invoked by alias); 12 Dec 2014 17:52:59 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 20329 invoked by uid 48); 12 Dec 2014 17:52:55 -0000 From: "dvyukov at google dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/64265] [5 Regression] r217669 broke tsan Date: Fri, 12 Dec 2014 17:52:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dvyukov at google dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-12/txt/msg01464.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265 --- Comment #11 from Dmitry Vyukov --- >Doing it in gimplify_function_tree is pretty straightforward That's good! >So, the question is just if you want to do it that way... Kostya, can you say anything about llvm? On the tsan issue you said: "We'll need a kind of RAII for tsan entry/exit hooks. When we are adding tsan instrumentation, we need to create a fake class object with a ctor and dtor." Which suggests that you wanted to do it in a similar way in llvm. If we decide to it this way in both compilers, then no support in runtime is required, and gcc can well implement it ahead of llvm.