cpython: 0e41c4466d58 (original) (raw)

Mercurial > cpython

changeset 82458:0e41c4466d58 2.7

Issue #16445: Fix potential segmentation fault when deleting an exception message. [#16445]

Mark Dickinson dickinsm@gmail.com
date Sun, 03 Mar 2013 11:13:34 +0000
parents 2f500533e9b9
children 654136546895
files Lib/test/test_exceptions.py Misc/NEWS Objects/exceptions.c
diffstat 3 files changed, 16 insertions(+), 2 deletions(-)[+] [-] Lib/test/test_exceptions.py 12 Misc/NEWS 3 Objects/exceptions.c 3

line wrap: on

line diff

--- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -479,6 +479,18 @@ class ExceptionTests(unittest.TestCase): except AssertionError as e: self.assertEqual(str(e), "(3,)")

+

+

Helper class used by TestSameStrAndUnicodeMsg

class ExcWithOverriddenStr(Exception):

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -9,6 +9,9 @@ What's New in Python 2.7.4 Core and Builtins ----------------- +- Issue #16445: Fixed potential segmentation fault when deleting an exception

--- a/Objects/exceptions.c +++ b/Objects/exceptions.c @@ -349,8 +349,7 @@ BaseException_set_message(PyBaseExceptio if (PyDict_DelItemString(self->dict, "message") < 0) return -1; }