Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2658260f
Commit
2658260f
authored
Aug 23, 2008
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix #3653 Python could segfault if invalid values were passed to sys.excepthook
Author: Daniel Diniz Reviewer: Georg Brandl
parent
3c9d2efd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
Python/pythonrun.c
Python/pythonrun.c
+7
-0
No files found.
Python/pythonrun.c
View file @
2658260f
...
...
@@ -1300,6 +1300,13 @@ print_exception(PyObject *f, PyObject *value)
int
err
=
0
;
PyObject
*
type
,
*
tb
;
if
(
!
PyExceptionInstance_Check
(
value
))
{
PyFile_WriteString
(
"TypeError: print_exception(): Exception expected for value, "
,
f
);
PyFile_WriteString
(
Py_TYPE
(
value
)
->
tp_name
,
f
);
PyFile_WriteString
(
" found
\n
"
,
f
);
return
;
}
Py_INCREF
(
value
);
fflush
(
stdout
);
type
=
(
PyObject
*
)
Py_TYPE
(
value
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment