Serhiy Storchaka
04eb777279
Issue #23782 : Fixed possible memory leak in _PyTraceback_Add() and exception
loss in PyTraceBack_Here().
9 years ago
Victor Stinner
3466bde1cc
Avoid calling functions with an empty string as format string
Directly pass NULL rather than an empty string.
9 years ago
Victor Stinner
a88b2f4e5e
Fix reference leak in tb_printinternal()
Issue #26823 .
9 years ago
Nick Coghlan
d00342347e
Issue #26823 : Abbreviate recursive tracebacks
Large sections of repeated lines in tracebacks are now abbreviated as
"[Previous line repeated {count} more times]" by both the traceback
module and the builtin traceback rendering.
Patch by Emanuel Barry.
10 years ago
Berker Peksag
531396c764
Issue #27336 : Fix compilation failures --without-threads
10 years ago
Victor Stinner
1c3069aed6
Rework _Py_DumpASCII() to make Coverity happy
10 years ago
Victor Stinner
bd31b7c483
Issue #23848 : Expose _Py_DumpHexadecimal()
This function will be reused by faulthandler.
10 years ago
Victor Stinner
861d9abfcf
faulthandler now works in non-Python threads
Issue #26563 :
* Add _PyGILState_GetInterpreterStateUnsafe() function: the single
PyInterpreterState used by this process' GILState implementation.
* Enhance _Py_DumpTracebackThreads() to retrieve the interpreter state from
autoInterpreterState in last resort. The function now accepts NULL for interp
and current_tstate parameters.
* test_faulthandler: fix a ResourceWarning when test is interrupted by CTRL+c
10 years ago
Victor Stinner
013024ef67
Fix compilation error of traceback.c on Windows
Issue #26564 .
10 years ago
Victor Stinner
89e7cdcb9c
Enhance and rewrite traceback dump C functions
Issue #26564 :
* Expose _Py_DumpASCII() and _Py_DumpDecimal() in traceback.h
* Change the type of the second _Py_DumpASCII() parameter from int to unsigned
long
* Rewrite _Py_DumpDecimal() and dump_hexadecimal() to write directly characters
in the expected order, avoid the need of reversing the string.
* dump_hexadecimal() limits width to the size of the buffer
* _Py_DumpASCII() does nothing if the object is not a Unicode string
* dump_frame() wrtites "???" as the line number if the line number is negative
10 years ago
Serhiy Storchaka
73c95f1949
Issue #24436 : Added const qualifiers for char* arguments of _PyTraceback_Add.
Patch by Michael Ensslin.
11 years ago
Steve Dower
8fc8980c96
Issue #23524 : Replace _PyVerify_fd function with calls to _set_thread_local_invalid_parameter_handler.
11 years ago
Victor Stinner
81f241ab2e
Issue #23571 : If io.TextIOWrapper constructor fails in _Py_DisplaySourceLine(),
close the binary file to fix a resource warning.
11 years ago
Victor Stinner
97f86b82b7
Issue #23836 : Use _Py_write_noraise() to retry on EINTR in _Py_DumpTraceback()
and _Py_DumpTracebackThreads(). Document also these functions to explain that
the caller is responsible to call PyErr_CheckSignals().
11 years ago
Victor Stinner
5e78f4daa8
Issue #22762 : Fix _Py_DisplaySourceLine(), clear the exception if
PyFile_GetLine() failed. Patch written by Xavier de Gaye.
11 years ago
Antoine Pitrou
0ddbf4795f
Issue #22462 : Fix pyexpat's creation of a dummy frame to make it appear in exception tracebacks.
Initial patch by Mark Shannon.
11 years ago
Victor Stinner
b86f08f743
faulthandler: enhance dump_ascii() to escape also non-printable ASCII
characters (U+0000..U+001f and U+007f).
11 years ago
Victor Stinner
98ea54c35c
Issue #22156 : Fix "comparison between signed and unsigned integers" compiler
warnings in the Python/ subdirectory.
12 years ago
Victor Stinner
5272fa9c57
Fix _Py_DisplaySourceLine(), if PyTokenizer_FindEncodingFilename() fails, clear
the exception to not call open() with an exception set.
12 years ago
Victor Stinner
bd303c165b
Issue #19512 , #19515 : remove shared identifiers, move identifiers where they
are used.
Move also _Py_IDENTIFIER() defintions to the top in modified files to remove
identifiers duplicated in the same file.
12 years ago
Victor Stinner
090543736f
Issue #19512 : add some common identifiers to only create common strings once,
instead of creating temporary Unicode string objects
Add also more identifiers in pythonrun.c to avoid temporary Unicode string
objets for the interactive interpreter.
12 years ago
Guido van Rossum
7be5d7d0e0
Issue 19306: Add extra hints to faulthandler stack dumps that they are upside down.
12 years ago
Benjamin Peterson
0f9b7d32c7
fix spacing
13 years ago
Benjamin Peterson
04b01dc8f7
let's not return NULL from functions that should return ints
13 years ago
Christian Heimes
1f34729f42
Check return value of lseek() in _Py_DisplaySourceLine().
Also use portable SEEK_SET instead of 0.
CID 1040639
13 years ago
Christian Heimes
8c077bc03e
Check return value of PyObject_AsFileDescriptor() in _Py_DisplaySourceLine() for error
CID 486768
13 years ago
Victor Stinner
ceceaa00ba
Issue #18408 : Fix _Py_DisplaySourceLine()
Report _Py_FindSourceFile() error, so the error is cleared;
and clear io.open(filename) exception on failure.
13 years ago
Victor Stinner
84bb1cf994
Fix compilater warnings on Windows 64-bit
13 years ago
Victor Stinner
54f939b9ae
Issue #15463 : the faulthandler module truncates strings to 500 characters,
instead of 100, to be able to display long file paths
14 years ago
Kristján Valur Jónsson
c5963d3842
Issue #15365 : Make traceback reporting ignore any errors when printing out
the source line. Such errors can't be reported anyway. This makes error
reporting work, even if the "io" module can't be loaded.
14 years ago
Victor Stinner
63ab875cfe
Remove "#ifdef Py_UNICODE_WIDE": Python is now always wide
14 years ago
Martin v. Löwis
bd928fef42
Rename _Py_identifier to _Py_IDENTIFIER.
14 years ago
Victor Stinner
f5cff56a1b
Issue #13088 : Add shared Py_hexdigits constant to format a number into base 16
14 years ago
Martin v. Löwis
afe55bba33
Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
14 years ago
Victor Stinner
a336de7ae1
traceback: fix dump_ascii() for string with kind=PyUnicode_WCHAR_KIND
14 years ago
Martin v. Löwis
d63a3b8beb
Implement PEP 393.
14 years ago
Victor Stinner
fe7c5b5bdf
Issue #9319 : Include the filename in "Non-UTF8 code ..." syntax error.
15 years ago
Victor Stinner
fcb88c4503
Issue #11393 : _Py_DumpTraceback() writes the header even if there is no frame
15 years ago
Victor Stinner
024e37adcc
Issue #11393 : Add the new faulthandler module
15 years ago
Georg Brandl
e5b99f0fb3
Remove redundant includes of headers that are already included by Python.h.
15 years ago
Victor Stinner
15244f7b12
Recorded merge of revisions 85569-85570 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85569 | victor.stinner | 2010-10-16 15:14:10 +0200 (sam., 16 oct. 2010) | 4 lines
Issue #9713 , #10114 : Parser functions (eg. PyParser_ASTFromFile) expects
filenames encoded to the filesystem encoding with surrogateescape error handler
(to support undecodable bytes), instead of UTF-8 in strict mode.
........
r85570 | victor.stinner | 2010-10-16 15:42:53 +0200 (sam., 16 oct. 2010) | 4 lines
Fix ast_error_finish() and err_input(): filename can be NULL
Fix my previous commit (r85569).
........
15 years ago
Victor Stinner
4c7c8c3023
Issue #9713 , #10114 : Parser functions (eg. PyParser_ASTFromFile) expects
filenames encoded to the filesystem encoding with surrogateescape error handler
(to support undecodable bytes), instead of UTF-8 in strict mode.
15 years ago
Antoine Pitrou
3d400b7a58
Merged revisions 85497 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r85497 | antoine.pitrou | 2010-10-14 23:15:17 +0200 (jeu., 14 oct. 2010) | 3 lines
Explicitly close some files (from issue #10093 )
........
15 years ago
Antoine Pitrou
b86680e299
Explicitly close some files (from issue #10093 )
15 years ago
Victor Stinner
25bb0fdb67
Merged revisions 82059,82061 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82059 | victor.stinner | 2010-06-18 01:08:50 +0200 (ven., 18 juin 2010) | 5 lines
Issue #6543 : Write the traceback in the terminal encoding instead of utf-8.
Fix the encoding of the modules filename.
Reindent also traceback.h, just because I hate tabs :-)
........
r82061 | victor.stinner | 2010-06-18 01:17:37 +0200 (ven., 18 juin 2010) | 2 lines
Issue #6543 : Mention the author of the patch, Amaury Forgeot d'Arc
........
16 years ago
Victor Stinner
0fe25a445d
Issue #6543 : Write the traceback in the terminal encoding instead of utf-8.
Fix the encoding of the modules filename.
Reindent also traceback.h, just because I hate tabs :-)
16 years ago
Antoine Pitrou
7f14f0d8a0
Recorded merge of revisions 81032 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81032 | antoine.pitrou | 2010-05-09 17:52:27 +0200 (dim., 09 mai 2010) | 9 lines
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
................
16 years ago
Antoine Pitrou
f95a1b3c53
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
16 years ago
Antoine Pitrou
c7c96a90bc
Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines
Untabify C files. Will watch buildbots.
........
16 years ago
Antoine Pitrou
c83ea137d7
Untabify C files. Will watch buildbots.
16 years ago