From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1736 invoked by alias); 21 Nov 2013 09:43:53 -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 1671 invoked by uid 48); 21 Nov 2013 09:43:50 -0000 From: "glider at google dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/59148] FAIL: c-c++-common/asan/strncpy-overflow-1.c -O0 execution test on darwin13 Date: Thu, 21 Nov 2013 09:43: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: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: glider 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: --- 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: 2013-11/txt/msg02107.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59148 --- Comment #3 from Alexander Potapenko --- GCC emits calls to __strcpy_chk and __strncpy_chk in this test, which happens because of source fortification being on by default on Darwin. In Clang we're passing -D_FORTIFY_SOURCE=0 when compiling with -fsanitize=address. I've checked that manually adding -D_FORTIFY_SOURCE=0 fixes strncpy-overflow-1.c Jack, can you please make the changes in the GCC driver?