-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
data race when resizing unicode objects #132070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think in free-threading cpython/Objects/unicodeobject.c Lines 1197 to 1202 in a126cef
|
We should leave the assertions as is. I don't think that's related to this. The race is because For now, we should just add a suppression. |
We should change |
Would it make sense to change the behavior of #define Py_REFCNT(x) (PyObject_IsUniquelyReferenced((x)) ? 1 : INT_MAX) or some other arbitrary large number. |
There are some places where Py_REFCNT is compared with 2 or 0. |
Sure, but those don't work in free threaded builds today, right? So my question is whether we can make it so that |
Why couldn't it just be |
@ZeroIntensity - that's identical to I agree with @serhiy-storchaka here. |
Oh, that makes sense.
|
…3039) --------- Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
…ythongh-133039) --------- (cherry picked from commit 75cbb8d) Co-authored-by: Donghee Na <[email protected]> Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
…gh-133039) (gh-133126) * gh-132070: Use _PyObject_IsUniquelyReferenced in unicodeobject (gh-133039) --------- (cherry picked from commit 75cbb8d) Co-authored-by: Donghee Na <[email protected]> Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]> * Add _PyObject_IsUniquelyReferenced --------- Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
@ZeroIntensity Would you like to open a new issue to track adding unstable C API? |
Uh oh!
There was an error while loading. Please reload this page.
When running ctypes tests in parallel, the following data race is detected:
env TSAN_OPTIONS="suppressions=Tools/tsan/suppressions_free_threading.txt halt_on_error=1" ./python -m test test_ctypes --parallel-threads 4
Linked PRs
_PyObject_IsUniquelyReferenced
in unicodeobject #132091PyObject_Realloc
suppression in free-threading #132468The text was updated successfully, but these errors were encountered: