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

Skip to content

Commit 4e02538

Browse files
Issue #16856: Fix a segmentation fault from calling repr() on a dict with
a key whose repr raise an exception.
2 parents d8a0bac + 6c83e73 commit 4e02538

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
@@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1?
1010
Core and Builtins
1111
-----------------
1212

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

1518
- Issue #16761: Calling int() with base argument only now raises TypeError.

Objects/unicodeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10548,7 +10548,7 @@ PyUnicode_Append(PyObject **p_left, PyObject *right)
1054810548
return;
1054910549
}
1055010550
left = *p_left;
10551-
if (right == NULL || !PyUnicode_Check(left)) {
10551+
if (right == NULL || left == NULL || !PyUnicode_Check(left)) {
1055210552
if (!PyErr_Occurred())
1055310553
PyErr_BadInternalCall();
1055410554
goto error;

0 commit comments

Comments
 (0)