Analysis by Victor Stinner. Patch by Stefan Krah.
check(1000000)
+ def test_no_comdat_folding(self):
+ # Issue 8847: In the PGO build, the MSVC linker's COMDAT folding
+ # optimization causes failures in code that relies on distinct
+ # function addresses.
+ class L(list): pass
+ with self.assertRaises(TypeError):
+ (3,) + L([1,2])
+
def test_main(verbose=None):
support.run_unittest(ListTest)
check(10) # check our checking code
check(1000000)
+ def test_no_comdat_folding(self):
+ # Issue 8847: In the PGO build, the MSVC linker's COMDAT folding
+ # optimization causes failures in code that relies on distinct
+ # function addresses.
+ class T(tuple): pass
+ with self.assertRaises(TypeError):
+ [3,] + T((1,2))
+
def test_main():
support.run_unittest(TupleTest)
Build
-----
+- Issue #8847: Disable COMDAT folding in Windows PGO builds.
+
- Issue #14197: For OS X framework builds, ensure links to the shared
library are created with the proper ABI suffix.
<Tool\r
Name="VCLinkerTool"\r
OptimizeReferences="2"\r
- EnableCOMDATFolding="2"\r
+ EnableCOMDATFolding="1"\r
LinkTimeCodeGeneration="2"\r
ProfileGuidedDatabase="$(SolutionDir)$(PlatformName)-pgi\$(TargetName).pgd"\r
ImportLibrary="$(OutDirPGI)\$(TargetName).lib"\r