From owner-svn-src-head@FreeBSD.ORG Wed Mar 5 22:43:30 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EA758747; Wed, 5 Mar 2014 22:43:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D72CB919; Wed, 5 Mar 2014 22:43:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s25MhUw3044152; Wed, 5 Mar 2014 22:43:30 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s25MhU1j044151; Wed, 5 Mar 2014 22:43:30 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201403052243.s25MhU1j044151@svn.freebsd.org> From: Dimitry Andric Date: Wed, 5 Mar 2014 22:43:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r262809 - head/contrib/llvm/tools/clang/lib/CodeGen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Mar 2014 22:43:31 -0000 Author: dim Date: Wed Mar 5 22:43:30 2014 New Revision: 262809 URL: http://svnweb.freebsd.org/changeset/base/262809 Log: Pull in r203007 from upstream clang trunk: Don't produce an alias between destructors with different calling conventions. Fixes pr19007. (Please note that is an LLVM PR identifier, not a FreeBSD one.) This should fix Firefox and/or libxul crashes (due to problems with regparm/stdcall calling conventions) on i386. Reported by: multiple users on freebsd-current PR: bin/187103 MFC after: 1 week Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp Modified: head/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp Wed Mar 5 22:04:30 2014 (r262808) +++ head/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp Wed Mar 5 22:43:30 2014 (r262809) @@ -92,7 +92,13 @@ bool CodeGenModule::TryEmitBaseDestructo if (!ClassLayout.getBaseClassOffset(UniqueBase).isZero()) return true; + // Give up if the calling conventions don't match. We could update the call, + // but it is probably not worth it. const CXXDestructorDecl *BaseD = UniqueBase->getDestructor(); + if (BaseD->getType()->getAs()->getCallConv() != + D->getType()->getAs()->getCallConv()) + return true; + return TryEmitDefinitionAsAlias(GlobalDecl(D, Dtor_Base), GlobalDecl(BaseD, Dtor_Base), false);