From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3573 invoked by alias); 9 Sep 2015 16:40:12 -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 2785 invoked by uid 55); 9 Sep 2015 16:40:05 -0000 From: "trippels at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/67258] "invalid vptr" false positive from ubsan for virtual inheritance Date: Wed, 09 Sep 2015 16:40: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: 5.1.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: trippels 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: --- 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: 2015-09/txt/msg00743.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67258 --- Comment #4 from Markus Trippelsdorf --- Author: trippels Date: Wed Sep 9 16:39:32 2015 New Revision: 227592 URL: https://gcc.gnu.org/viewcvs?rev=227592&root=gcc&view=rev Log: Fix sanitizer/67258 by cherry picking upstream patch PR sanitizer/67258 * ubsan/ubsan_type_hash.cc: Cherry pick upstream r244101. Upstream patch: commit 1d2477faafda9ad2cc19927b3c31efd22747f013 Author: Alexey Samsonov Date: Wed Aug 5 19:35:46 2015 +0000 [UBSan] Fix UBSan-vptr false positive. Offset from vptr to the start of most-derived object can actually be positive in some virtual base class vtables. Patch by Stephan Bergmann! git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@244101 91177308-0d34-0410-b5e6-96231b3b80d8 Added: branches/gcc-5-branch/gcc/testsuite/g++.dg/ubsan/vptr-10.C Modified: branches/gcc-5-branch/libsanitizer/ChangeLog branches/gcc-5-branch/libsanitizer/ubsan/ubsan_type_hash.cc