From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82948 invoked by alias); 9 Sep 2015 11:49:05 -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 82864 invoked by uid 48); 9 Sep 2015 11:49:01 -0000 From: "rogero at howzatt dot demon.co.uk" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/67515] New: "invalid vptr" false positive or crash from ubsan for non-virtual call in initializer list Date: Wed, 09 Sep 2015 11:49:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rogero at howzatt dot demon.co.uk X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: 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: 2015-09/txt/msg00710.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67515 Bug ID: 67515 Summary: "invalid vptr" false positive or crash from ubsan for non-virtual call in initializer list Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: rogero at howzatt dot demon.co.uk CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org Target Milestone: --- Created attachment 36312 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36312&action=edit Sample program showing the false positive and the seg fault ubsan produces a warning at runtime from the attached code and then crashes. The crash is provoked by performing a placement new with a pre-populated buffer, but can occur 'in the wild' depending on what the memory contents are at runtime. Fails with trunk (as at 2015-09-08 using http://melpon.org/wandbox/) and gcc 5.2.0 (This may possibly be related to pr67258)