| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current test_child_terminated_in_stopped_state() function test
creates a child process which calls ptrace(PTRACE_TRACEME, 0, 0) and
then crash (SIGSEGV). The problem is that calling os.waitpid() in the
parent process is not enough to close the process: the child process
remains alive and so the unit test leaks a child process in a
strange state. Closing the child process requires non-trivial code,
maybe platform specific.
Remove the functional test and replaces it with an unit test which
mocks os.waitpid() using a new _testcapi.W_STOPCODE() function to
test the WIFSTOPPED() path.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* Make PyTraceMalloc_Track() and PyTraceMalloc_Untrack() functions
public (remove the "_" prefix)
* Remove the _PyTraceMalloc_domain_t type: use directly unsigned
int.
* Document methods
Note: methods are already tested in test_tracemalloc.
|
|
|
|
|
|
|
| |
Test C functions:
* _PyObject_FastCall()
* _PyObject_FastCallDict()
* _PyObject_FastCallKeywords()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If we have a chain of generators/coroutines that are 'yield from'ing
each other, then resuming the stack works like:
- call send() on the outermost generator
- this enters _PyEval_EvalFrameDefault, which re-executes the
YIELD_FROM opcode
- which calls send() on the next generator
- which enters _PyEval_EvalFrameDefault, which re-executes the
YIELD_FROM opcode
- ...etc.
However, every time we enter _PyEval_EvalFrameDefault, the first thing
we do is to check for pending signals, and if there are any then we
run the signal handler. And if it raises an exception, then we
immediately propagate that exception *instead* of starting to execute
bytecode. This means that e.g. a SIGINT at the wrong moment can "break
the chain" – it can be raised in the middle of our yield from chain,
with the bottom part of the stack abandoned for the garbage collector.
The fix is pretty simple: there's already a special case in
_PyEval_EvalFrameEx where it skips running signal handlers if the next
opcode is SETUP_FINALLY. (I don't see how this accomplishes anything
useful, but that's another story.) If we extend this check to also
skip running signal handlers when the next opcode is YIELD_FROM, then
that closes the hole – now the exception can only be raised at the
innermost stack frame.
This shouldn't have any performance implications, because the opcode
check happens inside the "slow path" after we've already determined
that there's a pending signal or something similar for us to process;
the vast majority of the time this isn't true and the new check
doesn't run at all.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
possible but Coccinelle couldn't find opportunity.
|
|
|
|
| |
possible. Patch is writen with Coccinelle.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Issue #28147: Fix a memory leak in split-table dictionaries: setattr() must not
convert combined table into split table.
Patch written by INADA Naoki.
|
| |
| |
| |
| |
| |
| |
| | |
Replace:
PyObject_CallObject(callable, NULL)
with:
_PyObject_CallNoArg(callable)
|
| |
| |
| |
| | |
functions.
|
|\ \
| |/
| |
| |
| |
| | |
_PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
|
| |\
| | |
| | |
| | |
| | |
| | | |
_PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
|
| | |
| | |
| | |
| | |
| | |
| | | |
_PyUnicode_EqualToASCIIString.
The latter function is more readable, faster and doesn't raise exceptions.
|
|\ \ \
| |/ /
| | |
| | | |
PyDict_GetItemWithError(). Patch by Xiang Zhang.
|
| | |
| | |
| | |
| | | |
PyDict_GetItemWithError(). Patch by Xiang Zhang.
|
|/ /
| |
| |
| | |
Patch by Xiang Zhang.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Patch by Xiang Zhang.
|
|\ \
| |/
| |
| | |
Original patch by Xiang Zhang.
|
| |
| |
| |
| | |
Original patch by Xiang Zhang.
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Issue #26058: Add a new private version to the builtin dict type, incremented
at each dictionary creation and at each dictionary change.
Implementation of the PEP 509.
|
| | |
|
| | |
|
| |
| |
| |
| | |
types (#17884)
|
| | |
|
| | |
|
| |
| |
| |
| | |
Directly pass NULL rather than an empty string.
|
| | |
|
| | |
|
| |
| |
| |
| | |
positional-only and keyword parameters in the same function.
|
|\ \
| |/
| |
| | |
format unit.
|
| |
| |
| |
| | |
format unit.
|
|\ \
| |/
| |
| | |
in PyArg_ParseTuple().
|
| |
| |
| |
| | |
in PyArg_ParseTuple().
|
| | |
|
| |
| |
| |
| | |
unscathed to the C-defined function. Now it is converted to exact dict.
|
| | |
|
| |
| |
| |
| | |
Try to debug random failure on buildbots.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #26530:
* Add C functions _PyTraceMalloc_Track() and _PyTraceMalloc_Untrack() to track
memory blocks using the tracemalloc module.
* Add _PyTraceMalloc_GetTraceback() to get the traceback of an object.
|
| |
| |
| |
| |
| | |
Issue #26563: Debug hooks on Python memory allocators now raise a fatal error
if functions of the PyMem_Malloc() family are called without holding the GIL.
|