Mercurial > cpython-lru_cache-weakref
diff Lib/test/test_tuple.py @ 78366:2638ce032151 3.2
Issue #8847: Disable COMDAT folding in Windows PGO builds.
Analysis by Victor Stinner. Patch by Stefan Krah.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Wed, 01 Aug 2012 10:32:11 +0200 |
| parents | f9f782f2369e |
| children | d3afe5d8a4da |
line wrap: on
line diff
--- 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)
