Ken Jin
Ken Jin
In https://github.com/python/cpython/pull/118450, Sam pointed out that GC can occur at any `Py_DECREF`. With deferred references, we will need to traverse the object's stacks. The main problem is that `frame->stacktop` might...
For the unfortunate few of us who develop on Windows, it would be nice to support js-slang here. Currently there are a few obstacles: 1. `.sh` scripts are part of...
This PR mainly introduces GC changes to the free threading GC to support deferred reference counting in the future. To get this to work, new stack references *must* immediately live...
Follow up to https://github.com/python/cpython/pull/121622 There's a refleak which I traced down to a bug in the freelist clearing code, but I have no clue why it's causing it (see below)....
# Bug report ### Bug description: Reproducer: Remove all suppressions from https://github.com/python/cpython/blob/main/Tools/tsan/suppressions_free_threading.txt Build and Run with TSAN https://github.com/python/cpython/issues/117657 We get races like ``` SUMMARY: ThreadSanitizer: data race /home/ken/Documents/GitHub/cpython/Python/pystate.c:1665:32 in PyThreadState_Clear...
TSAN reported race: ``` WARNING: ThreadSanitizer: data race (pid=31237) Read of size 8 at 0x7fffb9ac6148 by thread T333: #0 PyException_GetTraceback /home/ken/Documents/GitHub/cpython/Objects/exceptions.c:415:12 (python+0x27c20b) (BuildId: e8ff96bc7d1e595a25cb4534a571573eaa53d4f4) #1 _PyErr_SetObject /home/ken/Documents/GitHub/cpython/Python/errors.c:242:14 (python+0x52cf07) (BuildId: e8ff96bc7d1e595a25cb4534a571573eaa53d4f4)...
I tested this by running the repros in the issue on a TSAN build for 2-3 minutes each. No races reported. * Issue: gh-121546
Adds per-object lock for gen_send to fix crashes. * Issue: gh-120321
# Feature or enhancement ### Proposal: Please see issue title. ### Has this already been discussed elsewhere? No response given ### Links to previous discussion of this feature: _No response_...
```mermaid graph LR subgraph Legend ORANGE(Orange - In-progress) GREEN(Green - Done) end TAG(Stack references) TAG --> DEBUG(Debug information) TAG --> HEAPREF(Heap references) HEAPREF --> UNBOX TAG --> UNBOX(Unboxed integers With...