Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6c83e73

Browse files
Issue #16856: Fix a segmentation fault from calling repr() on a dict with
a key whose repr raise an exception.
1 parent bf064b3 commit 6c83e73

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ What's New in Python 3.3.1?
1212
Core and Builtins
1313
-----------------
1414

15+
- Issue #16856: Fix a segmentation fault from calling repr() on a dict with
16+
a key whose repr raise an exception.
17+
1518
- Issue #16367: Fix FileIO.readall() on Windows for files larger than 2 GB.
1619

1720
- Issue #16455: On FreeBSD and Solaris, if the locale is C, the

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10672,7 +10672,7 @@ PyUnicode_Append(PyObject **p_left, PyObject *right)
1067210672
return;
1067310673
}
1067410674
left = *p_left;
10675-
if (right == NULL || !PyUnicode_Check(left)) {
10675+
if (right == NULL || left == NULL || !PyUnicode_Check(left)) {
1067610676
if (!PyErr_Occurred())
1067710677
PyErr_BadInternalCall();
1067810678
goto error;

0 commit comments

Comments
 (0)