From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AEDD0383F84F; Tue, 16 Jun 2020 07:24:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AEDD0383F84F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1592292286; bh=LIVFTfFPMrJfgq1yExp4aZHDg+e1uBWdER5weOEkCBI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SmBgJgjQFaxMyXJKVA2w3ssOLWev97p6w83ksCLwbJuMQQSXvin1FOxLc96Vqr+GI vp5tGa573acznxDv0azWFNYs9a8W7dDTW83ek3FVJgGF8UG7fvHvBvtqBYg3M11n8E aaFQbj3s6V2MTjKS1Kquzq3WSbotZ7kXHIu3EhmI= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/95693] [8/9/10/11 Regression] Incorrect error from undefined behavior sanitizer Date: Tue, 16 Jun 2020 07:24:46 +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: 10.1.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 8.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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: Tue, 16 Jun 2020 07:24:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95693 --- Comment #2 from Jakub Jelinek --- The Derived ctor seems to first perform zero initialization of the base for some reason and only then calls the Base constructor. Dunno if that is required or not, but since Alex' change actually also zeroes the reference.= =20 And this state before calling the Base is caught by the sanitizer. So, to = me it looks like a C++ FE problem that it zero initializes it first, or if it needs to, then it needs to either avoid what Alex' patch is doing (do that = only during error-recovery), or arrange somehow that it will not be sanitized.=