| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Thanks! This pattern occurs in a bunch of places outside of setobject.c. Can you fix those as well? I think it's worth fixing the entire pattern at once. I think it's also probably worth refactoring the fast hash check into its own inline function (maybe in pycore_object.h or pycore_unicodeobject.h) that does the whole check the type, check the unicode hash, return it if it's not -1, otherwise delegate to PyObject_Hash(). |
Sorry, something went wrong.
Thanks for the review! I think this new function is not related to unicode object only, so I added it in pycore_object.h, and named it _PyObject_HashFast(). |
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks - this looks good. Just minor comments about _PyObject_HashFast
Sorry, something went wrong.
Co-authored-by: Sam Gross <colesbury@gmail.com>
There was a problem hiding this comment.
Thanks! LGTM
Sorry, something went wrong.
|
Thanks @aisk for the PR, and @colesbury for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Sorry, something went wrong.
…ythonGH-120914) Refactor the fast Unicode hash check into `_PyObject_HashFast` and use relaxed atomic loads in the free-threaded build. After this change, the TSAN doesn't report data races for this method. (cherry picked from commit 294e724) Co-authored-by: AN Long <aisk@users.noreply.github.com>
|
GH-121240 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
|
Nice change, I like _PyObject_HashFast() which factorizes the code. |
Sorry, something went wrong.
…GH-120914) (#121240) Refactor the fast Unicode hash check into `_PyObject_HashFast` and use relaxed atomic loads in the free-threaded build. After this change, the TSAN doesn't report data races for this method. (cherry picked from commit 294e724) Co-authored-by: AN Long <aisk@users.noreply.github.com>
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 Debian root 3.13 has failed when building commit 06fd745. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/1441/builds/255 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Click to see traceback logsTraceback (most recent call last):
File "/root/buildarea/3.13.angelico-debian-amd64/build/Lib/asyncio/__main__.py", line 109, in run
raise OSError(errno.ENOTTY, "tty required", "stdin")
xiting asyncio REPL...
Fatal Python error: _enter_buffered_busy: could not acquire lock for <_io.BufferedWriter name='<stderr>'> at interpreter shutdown, possibly due to daemon threads
Python runtime state: finalizing (tstate=0x0000557e5090ff50)
Traceback (most recent call last):
xiting asyncio REPL...
File "/root/buildarea/3.13.angelico-debian-amd64/build/Lib/asyncio/__main__.py", line 109, in run
raise OSError(errno.ENOTTY, "tty required", "stdin")
Fatal Python error: _enter_buffered_busy: could not acquire lock for <_io.BufferedWriter name='<stderr>'> at interpreter shutdown, possibly due to daemon threads
Python runtime state: finalizing (tstate=0x0000561498692f50)
Traceback (most recent call last):
File "/root/buildarea/3.13.angelico-debian-amd64/build/Lib/test/test_repl.py", line 199, in test_asyncio_repl_is_ok
assert_python_ok("-m", "asyncio")
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/root/buildarea/3.13.angelico-debian-amd64/build/Lib/test/support/script_helper.py", line 180, in assert_python_ok
return _assert_python(True, *args, **env_vars)
File "/root/buildarea/3.13.angelico-debian-amd64/build/Lib/test/support/script_helper.py", line 165, in _assert_python
res.fail(cmd_line)
~~~~~~~~^^^^^^^^^^
File "/root/buildarea/3.13.angelico-debian-amd64/build/Lib/test/support/script_helper.py", line 75, in fail
raise AssertionError("Process return code is %d\n"
...<13 lines>...
err))
AssertionError: Process return code is -6
command line: ['/root/buildarea/3.13.angelico-debian-amd64/build/python', '-X', 'faulthandler', '-I', '-m', 'asyncio']
|
Sorry, something went wrong.
|
Buildbot failure is unrelated to this PR. See #119909 |
Sorry, something went wrong.
…ython#120914) Refactor the fast Unicode hash check into `_PyObject_HashFast` and use relaxed atomic loads in the free-threaded build. After this change, the TSAN doesn't report data races for this method.
…ython#120914) Refactor the fast Unicode hash check into `_PyObject_HashFast` and use relaxed atomic loads in the free-threaded build. After this change, the TSAN doesn't report data races for this method.
…ython#120914) Refactor the fast Unicode hash check into `_PyObject_HashFast` and use relaxed atomic loads in the free-threaded build. After this change, the TSAN doesn't report data races for this method.
| Back | FazBrowse Home | New Git URL |
set_add_key and set_discard_key have the same issue and should be fixed, although they have not been detected by TSAN.
After this change, the TSAN doesn't report data races for this method on my machine.