Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Feb 2015 23:25:41 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r278788 - in stable: 10/contrib/llvm/tools/clang/lib/Serialization 9/contrib/llvm/tools/clang/lib/Serialization
Message-ID:  <201502142325.t1ENPfY4046638@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Sat Feb 14 23:25:39 2015
New Revision: 278788
URL: https://svnweb.freebsd.org/changeset/base/278788

Log:
  Pull in r201130 from upstream clang trunk (by Ted Kremenek):
  
    Fix PCH deserialization bug with local static symbols being treated
    as local extern.
  
    This triggered a miscompilation of code using Boost's
    function_template.hpp when it was included inside a PCH file.  A
    local static within that header would be treated as local extern,
    resulting in the wrong mangling.  This only occurred during PCH
    deserialization.
  
    Fixes <rdar://problem/15975816> and <rdar://problem/15926311>.
  
  This fixes a crash in audio/murmur, which is using both PCH and Boost.
  
  Direct commit to stable/10 and stable/9, since head has clang 3.5.1,
  which already includes this change.
  
  Reported by:	smh
  PR:		197389

Modified:
  stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp

Changes in other areas also in this revision:
Modified:
  stable/9/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp

Modified: stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp
==============================================================================
--- stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp	Sat Feb 14 22:12:17 2015	(r278787)
+++ stable/10/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp	Sat Feb 14 23:25:39 2015	(r278788)
@@ -971,7 +971,7 @@ ASTDeclReader::RedeclarableResult ASTDec
   VD->setCachedLinkage(VarLinkage);
 
   // Reconstruct the one piece of the IdentifierNamespace that we need.
-  if (VarLinkage != NoLinkage &&
+  if (VD->getStorageClass() == SC_Extern && VarLinkage != NoLinkage &&
       VD->getLexicalDeclContext()->isFunctionOrMethod())
     VD->setLocalExternDecl();
 



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