From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3172 invoked by alias); 6 Feb 2013 12:49:14 -0000 Received: (qmail 2875 invoked by uid 48); 6 Feb 2013 12:48:40 -0000 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/55309] gcc's address-sanitizer 66% slower than clang's Date: Wed, 06 Feb 2013 12:49: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-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2013-02/txt/msg00521.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55309 --- Comment #21 from Jakub Jelinek 2013-02-06 12:48:39 UTC --- As the shadow memory doesn't have information about what locations are read-only, it only has info whether the relevant bytes are valid, or invalid (or some invalid, some valid), and for all invalid a few magic values for more detailed reporting. So, if you have a RMW statement, without any asan optimization it will first check the read, and already fail on the read, so even with the optimization if you just check the read and not the write, the user visible behavior will be exactly the same.