diff -r fd5166fdb978 Lib/test/test_list.py --- a/Lib/test/test_list.py Mon Jul 30 19:59:53 2012 +0300 +++ b/Lib/test/test_list.py Tue Jul 31 23:55:09 2012 +0200 @@ -70,6 +70,14 @@ 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) diff -r fd5166fdb978 Lib/test/test_tuple.py --- a/Lib/test/test_tuple.py Mon Jul 30 19:59:53 2012 +0300 +++ b/Lib/test/test_tuple.py Tue Jul 31 23:55:09 2012 +0200 @@ -164,6 +164,14 @@ 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) diff -r fd5166fdb978 PCbuild/pginstrument.vsprops --- a/PCbuild/pginstrument.vsprops Mon Jul 30 19:59:53 2012 +0300 +++ b/PCbuild/pginstrument.vsprops Tue Jul 31 23:55:09 2012 +0200 @@ -22,7 +22,7 @@