Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Mar 2014 22:43:30 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
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
Message-ID:  <201403052243.s25MhU1j044151@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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<FunctionType>()->getCallConv() !=
+      D->getType()->getAs<FunctionType>()->getCallConv())
+    return true;
+
   return TryEmitDefinitionAsAlias(GlobalDecl(D, Dtor_Base),
                                   GlobalDecl(BaseD, Dtor_Base),
                                   false);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403052243.s25MhU1j044151>