Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Issue #18408: PyEval_EvalFrameEx() and PyEval_CallObjectWithKeywords() now fail | Victor Stinner | 2013-07-17 | 2 | -0/+37 |
| | | | | | | | | | | | | with an assertion error if they are called with an exception set (PyErr_Occurred()). If these functions are called with an exception set, the exception may be cleared and so the caller looses its exception. Add also assertions to PyEval_CallObjectWithKeywords() and call_function() to check if the function succeed with no exception set, or the function failed with an exception set. | ||||
* | Issue #18408: Fix PyErr_SetImportError(), handle PyDict_SetItemString() failure | Victor Stinner | 2013-07-17 | 1 | -2/+5 |
| | |||||
* | Issue #18408: Fix _PyImport_LoadDynamicModule(), handle ↵ | Victor Stinner | 2013-07-17 | 1 | -0/+2 |
| | | | | PyUnicode_FromFormat() failure | ||||
* | Issue #18408: Fix ast_for_atom(), PyErr_Fetch(&type, &value, &tback) can set ↵ | Victor Stinner | 2013-07-17 | 1 | -1/+1 |
| | | | | value to NULL | ||||
* | Close #18469: Replace PyDict_GetItemString() with _PyDict_GetItemId() in ↵ | Victor Stinner | 2013-07-16 | 1 | -0/+3 |
| | | | | | | | | | | | | structseq.c _PyDict_GetItemId() is more efficient: it only builds the Unicode string once. Identifiers (dictionary keys) are now created at Python initialization, and if the creation failed, Python does exit with a fatal error. Before, PyDict_GetItemString() failure was not handled: structseq_new() could call PyObject_GC_NewVar() with a negative size, and structseq_dealloc() could also crash. | ||||
* | Issue #18408: Handle PyArena_AddPyObject() failure in ast.c | Victor Stinner | 2013-07-16 | 1 | -5/+20 |
| | | | | | PyList_Append() (called by PyArena_AddPyObject()) can fail because of a MemoryError for example. | ||||
* | Issue #18408: Fix PyErr_NormalizeException(), handle PyObject_IsSubclass() ↵ | Victor Stinner | 2013-07-16 | 1 | -1/+10 |
| | | | | | | failure PyObject_IsSubclass() can fail and raise a new exception! | ||||
* | Issue #18408: Fix Python-ast.c: handle init_types() failure (ex: MemoryError) | Victor Stinner | 2013-07-16 | 1 | -3/+6 |
| | |||||
* | Issue #18408: handle PySys_GetObject() failure, raise a RuntimeError | Victor Stinner | 2013-07-16 | 2 | -6/+13 |
| | |||||
* | Issue #18408: Fix show_warning(), clear also the exception raised by | Victor Stinner | 2013-07-15 | 1 | -3/+3 |
| | | | | | | | | _Py_DisplaySourceLine() For example, _PyGC_DumpShutdownStats() calls PyErr_WarnExplicitFormat() while the import machinery does not work anymore, _Py_DisplaySourceLine() fails when trying to import the io module. | ||||
* | Issue #18408: add more assertions on PyErr_Occurred() in ceval.c to detect bugs | Victor Stinner | 2013-07-15 | 1 | -0/+4 |
| | | | | earlier | ||||
* | Issue #18408: Fix _Py_DisplaySourceLine() | Victor Stinner | 2013-07-15 | 1 | -1/+3 |
| | | | | | Report _Py_FindSourceFile() error, so the error is cleared; and clear io.open(filename) exception on failure. | ||||
* | Issue #18408: Fix PyEval_EvalFrameEx() for MemoryError | Victor Stinner | 2013-07-15 | 1 | -1/+4 |
| | | | | | Don't pass a NULL traceback to PyException_SetTraceback(): pass Py_None. Passing NULL would raise a new exception. | ||||
* | Issue #18342: Use the repr of a module name for ``from ... import | Brett Cannon | 2013-07-12 | 1 | -1/+1 |
| | | | | | | | | ...`` when an ImportError occurs. Other cases had already been switched over to using the repr. Thanks to Tomasz Maćkowiak for the patch. | ||||
* | Issue #18415: Normalize what type of quotes are used with string | Brett Cannon | 2013-07-12 | 1 | -6/+6 |
| | | | | | | | constants in importlib._bootstrap. Along the way clean up from string interpolation to use the repr explicitly. Initial patch by Madison May. | ||||
* | Issue #18408: errors.c: in debug mode, calling PyErr_BadInternalCall() now | Victor Stinner | 2013-07-11 | 1 | -0/+1 |
| | | | | fails with an assertion error | ||||
* | Issue #18408: ceval.c: in debug mode, convert the PyErr_Occurred() check on | Victor Stinner | 2013-07-11 | 1 | -0/+4 |
| | | | | exception (when getting NULL) to an assertion to detect bugs earlier | ||||
* | Issue #18408: normalizestring() now raises MemoryError on memory allocation ↵ | Victor Stinner | 2013-07-11 | 1 | -1/+1 |
| | | | | failure | ||||
* | Issue #18408: Fix compiler_import() to handle PyUnicode_Substring() failure ↵ | Victor Stinner | 2013-07-11 | 1 | -1/+4 |
| | | | | properly | ||||
* | Issue #18408: ste_new() initialize all attributes before handling error | Victor Stinner | 2013-07-11 | 1 | -13/+9 |
| | | | | If an attribute is not initialized, the destructor can crash | ||||
* | Issue #17872: Fix a segfault in marshal.load() when input stream returns | Serhiy Storchaka | 2013-07-11 | 1 | -15/+20 |
|\ | | | | | | | more bytes than requested. | ||||
| * | Issue #17872: Fix a segfault in marshal.load() when input stream returns | Serhiy Storchaka | 2013-07-11 | 1 | -15/+20 |
| | | | | | | | | more bytes than requested. | ||||
* | | Fix reference leaks introduced by the patch for issue #5308. | Serhiy Storchaka | 2013-07-11 | 1 | -12/+11 |
|\ \ | |/ | |||||
| * | Fix reference leaks introduced by the patch for issue #5308. | Serhiy Storchaka | 2013-07-11 | 1 | -12/+11 |
| | | |||||
* | | Issue #18426: improve exception message. Courtesy of Amaury | Christian Heimes | 2013-07-11 | 1 | -1/+5 |
|\ \ | |/ | |||||
| * | Issue #18426: improve exception message. Courtesy of Amaury | Christian Heimes | 2013-07-11 | 1 | -1/+5 |
| | | |||||
* | | Issue #18426: Fix NULL pointer dereference in C extension import when | Christian Heimes | 2013-07-11 | 1 | -0/+2 |
|\ \ | |/ | | | | | PyModule_GetDef() returns an error. | ||||
| * | Issue #18426: Fix NULL pointer dereference in C extension import when | Christian Heimes | 2013-07-11 | 1 | -0/+2 |
| | | | | | | | | PyModule_GetDef() returns an error. | ||||
* | | Merge: #18424: PEP8ify the tense of the sum docstring. | R David Murray | 2013-07-10 | 1 | -2/+2 |
|\ \ | |/ | |||||
| * | #18424: PEP8ify the tense of the sum docstring. | R David Murray | 2013-07-10 | 1 | -2/+2 |
| | | |||||
* | | Issue #18408: Fix call_exc_trace(): if the traceback is NULL, use None when | Victor Stinner | 2013-07-10 | 1 | -3/+8 |
| | | | | | | | | | | | | building the tuple (type, value, traceback) passed to the callback. PyTuple_Pack() does crash if an argument is NULL. | ||||
* | | Issue #18408: Fix PyCode_Optimize(): raise a MemoryError on memory allocation | Victor Stinner | 2013-07-08 | 1 | -2/+6 |
| | | | | | | | | failure. | ||||
* | | Issue #18408: Fix call_function() of ceval.c to handle PyTuple_New() failure | Victor Stinner | 2013-07-08 | 1 | -4/+9 |
| | | | | | | | | (in load_args()), ex: MemoryError. | ||||
* | | Issue #18408: Fix marshal reader for Unicode strings: handle | Victor Stinner | 2013-07-08 | 1 | -0/+4 |
| | | | | | | | | PyUnicode_DecodeUTF8() failure (ex: MemoryError). | ||||
* | | Issue #18203: Add _PyMem_RawStrdup() and _PyMem_Strdup() | Victor Stinner | 2013-07-07 | 1 | -9/+12 |
| | | | | | | | | | | Replace strdup() with _PyMem_RawStrdup() or _PyMem_Strdup(), depending if the GIL is held or not. | ||||
* | | Issue #18203: Replace malloc() with PyMem_Malloc() to allocate arena objects | Victor Stinner | 2013-07-07 | 1 | -6/+6 |
| | | |||||
* | | Issue #18203: Replace malloc() with PyMem_RawMalloc() to allocate thread locks | Victor Stinner | 2013-07-07 | 2 | -10/+10 |
| | | |||||
* | | Issue #18203: Fix decode_ascii_surrogateescape(), use PyMem_RawMalloc() as ↵ | Victor Stinner | 2013-07-07 | 1 | -1/+1 |
| | | | | | | | | _Py_char2wchar() | ||||
* | | Issue #18203: Replace malloc() with PyMem_RawMalloc() at Python initialization | Victor Stinner | 2013-07-07 | 3 | -25/+25 |
| | | | | | | | | | | | | | | * Replace malloc() with PyMem_RawMalloc() * Replace PyMem_Malloc() with PyMem_RawMalloc() where the GIL is not held. * _Py_char2wchar() now returns a buffer allocated by PyMem_RawMalloc(), instead of PyMem_Malloc() | ||||
* | | Issue #18203: Fix Py_Finalize(): destroy the GIL after the last call to | Victor Stinner | 2013-07-07 | 1 | -9/+9 |
| | | | | | | | | | | | | | | PyMem_Malloc() or PyObject_Malloc(). For example, PyCFunction_Fini() calls PyObject_GC_Del() which calls PyObject_FREE(). | ||||
* | | merge for issue #18351. | Brett Cannon | 2013-07-06 | 1 | -801/+799 |
|\ \ | |/ | |||||
| * | Issue #18351: Fix various issues with | Brett Cannon | 2013-07-06 | 1 | -3369/+3367 |
| | | | | | | | | | | | | | | | | | | importlib._bootstrap._get_sourcefile(). Thanks to its only use by the C API, it was never properly tested until now. Thanks to Neal Norwitz for discovering the bug and Madison May for the patch. | ||||
* | | Issue #18364: Stop using the ImportError._not_found hack. | Brett Cannon | 2013-07-06 | 1 | -3547/+3547 |
| | | | | | | | | | | | | The private attribute was leaking out of importlib and led to at least one person noticing it. Switch to another hack which won't leak outside of importlib and is nearly as robust. | ||||
* | | Issue #15767: back out 8a0ed9f63c6e, finishing the removal of | Brett Cannon | 2013-07-04 | 2 | -371/+375 |
| | | | | | | | | ModuleNotFoundError. | ||||
* | | Issue #15767: Revert 3a50025f1900 for ModuleNotFoundError | Brett Cannon | 2013-07-04 | 3 | -818/+797 |
| | | |||||
* | | Issue #18328: Reorder ops in PyThreadState_Delete*() functions. Now the | Christian Heimes | 2013-07-01 | 1 | -2/+2 |
|\ \ | |/ | | | | | | | | | tstate is first removed from TLS and then deallocated. CID 1019639 (#1 of 1): Use after free (USE_AFTER_FREE) use_after_free: Using freed pointer tstate. | ||||
| * | Issue #18328: Reorder ops in PyThreadState_Delete*() functions. Now the | Christian Heimes | 2013-07-01 | 1 | -2/+2 |
| | | | | | | | | | | | | tstate is first removed from TLS and then deallocated. CID 1019639 (#1 of 1): Use after free (USE_AFTER_FREE) use_after_free: Using freed pointer tstate. | ||||
* | | Issue 18111: Add a default argument to min() and max() | Raymond Hettinger | 2013-06-25 | 1 | -14/+26 |
| | | |||||
* | | If MS_WIN64 is defined, MS_WINDOWS is also defined: #ifdef can be simplified. | Victor Stinner | 2013-06-24 | 1 | -2/+2 |
| | | |||||
* | | Issue #9566: pystrtod.c: Fix a compiler warnings on Windows x64 | Victor Stinner | 2013-06-24 | 1 | -2/+2 |
| | |