-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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
New warnings: warning: unused function 'ensure_shared_on_read' [-Wunused-function]
#116029
Labels
Comments
warning: unused function 'ensure_shared_on_read' [-Wunused-function
warning: unused function 'ensure_shared_on_read' [-Wunused-function]
warning: unused function 'ensure_shared_on_read' [-Wunused-function]
warning: unused function 'ensure_shared_on_read' [-Wunused-function]
I think both of these bugs have been fixed now: |
Since this function looks like this: static inline void
ensure_shared_on_read(PyDictObject *mp)
{
#ifdef Py_GIL_DISABLED
if (!_Py_IsOwnedByCurrentThread((PyObject *)mp) && !IS_DICT_SHARED(mp)) {
// The first time we access a dict from a non-owning thread we mark it
// as shared. This ensures that a concurrent resize operation will
// delay freeing the old keys or values using QSBR, which is necessary
// to safely allow concurrent reads without locking...
Py_BEGIN_CRITICAL_SECTION(mp);
if (!IS_DICT_SHARED(mp)) {
SET_DICT_SHARED(mp);
}
Py_END_CRITICAL_SECTION();
}
#endif
} I am going to cc @colesbury |
@colesbury it was fast 😆 I still see this on the latest main:
|
colesbury
added a commit
to colesbury/cpython
that referenced
this issue
Mar 4, 2024
colesbury
added a commit
that referenced
this issue
Mar 5, 2024
adorilson
pushed a commit
to adorilson/cpython
that referenced
this issue
Mar 25, 2024
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug report
Bug description:
Popped up during the build (
./configure --with-pydebug && make -j
):CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Linked PRs
The text was updated successfully, but these errors were encountered: