(original) (raw)
changeset: 78366:2638ce032151 branch: 3.2 parent: 78348:47536beb7453 user: Martin v. Löwis martin@v.loewis.de date: Wed Aug 01 10:32:11 2012 +0200 files: Lib/test/test_list.py Lib/test/test_tuple.py Misc/NEWS PCbuild/pginstrument.vsprops description: Issue #8847: Disable COMDAT folding in Windows PGO builds. Analysis by Victor Stinner. Patch by Stefan Krah. diff -r 47536beb7453 -r 2638ce032151 Lib/test/test_list.py --- a/Lib/test/test_list.py Tue Jul 31 19:48:00 2012 +0300 +++ b/Lib/test/test_list.py Wed Aug 01 10:32:11 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 47536beb7453 -r 2638ce032151 Lib/test/test_tuple.py --- a/Lib/test/test_tuple.py Tue Jul 31 19:48:00 2012 +0300 +++ b/Lib/test/test_tuple.py Wed Aug 01 10:32:11 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 47536beb7453 -r 2638ce032151 Misc/NEWS --- a/Misc/NEWS Tue Jul 31 19:48:00 2012 +0300 +++ b/Misc/NEWS Wed Aug 01 10:32:11 2012 +0200 @@ -425,6 +425,8 @@ 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. diff -r 47536beb7453 -r 2638ce032151 PCbuild/pginstrument.vsprops --- a/PCbuild/pginstrument.vsprops Tue Jul 31 19:48:00 2012 +0300 +++ b/PCbuild/pginstrument.vsprops Wed Aug 01 10:32:11 2012 +0200 @@ -22,7 +22,7 @@ /martin@v.loewis.de