From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 87640384BC11; Wed, 24 Mar 2021 14:16:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 87640384BC11 From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/96318] FAIL: c-c++-common/asan/strncpy-overflow-1.c * output pattern test with C on Darwin Date: Wed, 24 Mar 2021 14:16:04 +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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iains at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: iains at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to target_milestone Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2021 14:16:05 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96318 Iain Sandoe changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |ASSIGNED Assignee|unassigned at gcc dot gnu.org |iains at gcc dot gn= u.org Target Milestone|--- |9.4 --- Comment #3 from Iain Sandoe --- I fixed this for master, but failed to mention the PR number. r11-7704-gc86c5195c8c02f58 Part of the problem is that Darwin defaults to _FORTIFY_SOURCE if that is n= ot explicitly given, and this results in the substitution of _chk builtins. T= his means that the disabling of the regular builtins fails (and we never have t= he call expected). That's fixable by adding -D _FORTIFY_SOURCE=3D0 to the command line. The other part of the issue is that the system address symboliser (atos) is= not consuming the debug / frame information we are producing. At present, it's= not clear if that's a GCC debug bug or an atos bug. Adding "-gdwarf-3" is sufficient to fix things in this case and is functional for the test-case. Investigation of the debug etc. will need to be deferred to the next stage1= and I am leaving this PR open, since the problem also exists on 10.x and 9.x (I will back port to at least 10.x).=