From 4c1730db7c8735d2424471e63a2fa7d690192899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Wed, 1 Aug 2012 10:32:11 +0200 Subject: Issue #8847: Disable COMDAT folding in Windows PGO builds. Analysis by Victor Stinner. Patch by Stefan Krah. --- Lib/test/test_tuple.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Lib/test/test_tuple.py') diff --git a/Lib/test/test_tuple.py b/Lib/test/test_tuple.py index 1464a0e50f..6e934fb882 100644 --- a/Lib/test/test_tuple.py +++ b/Lib/test/test_tuple.py @@ -164,6 +164,14 @@ class TupleTest(seq_tests.CommonTest): 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) -- cgit v1.2.1