| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
| |
* Adds some missing #includes
|
| |
|
|
| |
(GH-131493)
|
| |
|
| |
Remove also now unused includes in C files.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the following warnings:
* Modules\_io\fileio.c(1296,13): unused variable 'self'
* Modules\_io\winconsoleio.c(334,9): unused variable 'fd_is_own'
* Modules\faulthandler.c(409,11): unused variable 'flags'
* Modules\posixmodule.c(5699,9): unused variable 'pathError'
* PC\winreg.c(2077,5): suggest braces around initialization of
subobject
* PC\winreg.c(34,13): unused variable 'errNotAHandle'
* Python\fileutils.c(132,12): result of comparison of constant
1114111 with expression of type 'wchar_t' (aka 'unsigned short') is
always false
* Python\fileutils.c(58,21): unused variable 'INCOMPLETE_CHARACTER'
* Python\sysmodule.c(2534,21): unused variable 'perf_map_state'
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Move _PyInterpreterFrame and associated functions
to a new pycore_interpframe.h header.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Remove includes from pycore_pystate.h:
* pycore_runtime_structs.h
* pycore_runtime.h
* pycore_tstate.h
* pycore_interp.h
* Reorganize internal headers. Move _gc_thread_state from
pycore_interp_structs.h to pycore_tstate.h.
* Add 3 new header files to PCbuild/pythoncore.vcxproj.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
| |
Add include to for pystats builds
|
| |
|
|
| |
Adds new pycore_stats.h header file to help break dependencies involving the pycore_code.h header.
|
| | |
|
| |
|
|
|
|
|
|
| |
Convert static inline functions to functions:
* _Py_IsMainThread()
* _PyInterpreterState_Main()
* _Py_IsMainInterpreterFinalizing()
* _Py_GetMainConfig()
|
| |
|
|
|
| |
* Moves most structs in pycore_ header files into pycore_structs.h and pycore_runtime_structs.h
* Removes many cross-header dependencies
|
| |
|
|
|
|
| |
fix warning : integer literal is too large
to be represented in a signed integer type,
interpreting as unsigned [-Wimplicitly-unsigned-literal]
|
| |
|
|
|
| |
* fix compile error due to `BINARY_SUBSCR`
* replace stat_inc with `BINARY_OP`
|
| |
|
|
| |
(#130481)
|
| | |
|
| |
|
|
|
| |
Don't use PyObject_Free() as tp_dealloc to avoid an undefined
behavior. Instead, use the default deallocator which just calls
tp_free which is PyObject_Free().
|
| |
|
|
|
|
| |
(#131088)
Implements a workaround implementation of `pthread_get_stackaddr_np` for Emscripten.
This will be replaced by an implementation that will be included in Emscripten 4.0.6.
|
| | |
|
| |
|
|
| |
used outside of the compiler (#130930)
|
| | |
|
| |
|
|
|
| |
on iOS (#131172)
Modify default behavior of use_system_log to enable on iOS.
|
| |
|
|
| |
sequence during constant folding (#131054)
|
| | |
|
| |
|
|
| |
Add free-threaded versions of existing specialization for FOR_ITER (list, tuples, fast range iterators and generators), without significantly affecting their thread-safety. (Iterating over shared lists/tuples/ranges should be fine like before. Reusing iterators between threads is not fine, like before. Sharing generators between threads is a recipe for significant crashes, like before.)
|
| | |
|
| | |
|
| |
|
| |
Use "PyObject*" for METH_O functions to fix an undefined behavior.
|
| |
|
|
| |
Thread sanitizer will often crash if a test uses more than half the
stack.
|
| |
|
|
|
| |
* Add missing guards for WIN32_LEAN_AND_MEAN
* add missing whitespaces
|
| |
|
|
| |
(#117500)
|
| |
|
|
| |
the pattern. (GH-130627)
|
| | |
|
| |
|
| |
* Both branches in a pair now have a common source and are included in co_branches
|
| |
|
|
|
|
| |
The write of the item to the list needs to use an atomic operation in
the free threading build.
Co-authored-by: Tomasz Pytel <tompytel@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PyThreadState field gains a reference count field to avoid
issues with PyThreadState being a dangling pointer to freed memory.
The refcount starts with a value of two: one reference is owned by the
interpreter's linked list of thread states and one reference is owned by
the OS thread. The reference count is decremented when the thread state
is removed from the interpreter's linked list and before the OS thread
calls `PyThread_hang_thread()`. The thread that decrements it to zero
frees the `PyThreadState` memory.
The `holds_gil` field is moved out of the `_status` bit field, to avoid
a data race where on thread calls `PyThreadState_Clear()`, modifying the
`_status` bit field while the OS thread reads `holds_gil` when
attempting to acquire the GIL.
The `PyThreadState.state` field now has `_Py_THREAD_SHUTTING_DOWN` as a
possible value. This corresponds to the `_PyThreadState_MustExit()`
check. This avoids race conditions in the free threading build when
checking `_PyThreadState_MustExit()`.
|
| |
|
|
| |
This amends f39a07be47
|
| |
|
| |
Typo introduced in gh-118910.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix use after free in list objects
Set the items pointer in the list object to NULL after the items array
is freed during list deallocation. Otherwise, we can end up with a list
object added to the free list that contains a pointer to an already-freed
items array.
* Mark `_PyList_FromStackRefStealOnSuccess` as escaping
I think technically it's not escaping, because the only object that
can be decrefed if allocation fails is an exact list, which cannot
execute arbitrary code when it is destroyed. However, this seems less
intrusive than trying to special cases objects in the assert in `_Py_Dealloc`
that checks for non-null stackpointers and shouldn't matter for performance.
|