FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Allow local use of `static PyMutex` in the C analyzer by ZeroIntensity · Pull Request #127102 · python/cpython · GitHub

Repository navigation

Allow local use of static PyMutex in the C analyzer - #127102

Merged
vstinner merged 4 commits into
python:mainfrom
ZeroIntensity:static-mutex-in-analyzer
Nov 22, 2024
Merged

vstinner merged 4 commits into
python:mainfrom
ZeroIntensity:static-mutex-in-analyzer

Conversation

ZeroIntensity commented Nov 21, 2024 •
edited
Loading

Copy link
Copy Markdown
Member

As seen with gh-127055, the C analyzer doesn't like static local variables, but it's fine to do so for a PyMutex. If we want to use a similar approach for other libc functions (as mentioned in gh-127081), it would be better to gracefully handle this instead of adding to ignored.tsv every time.

Copy link
Copy Markdown
Member

Can you rebase your PR on the main branch and remove:

diff --git a/Tools/c-analyzer/cpython/ignored.tsv b/Tools/c-analyzer/cpython/ignored.tsv
index 4327a111eed..686f3935d91 100644
--- a/Tools/c-analyzer/cpython/ignored.tsv
+++ b/Tools/c-analyzer/cpython/ignored.tsv
@@ -739,7 +739,6 @@ Modules/expat/xmlrole.c     -       declClose       -
 Modules/expat/xmlrole.c        -       error   -
 
 ## other
-Modules/grpmodule.c    grp_getgrall_impl       getgrall_mutex  -
 Modules/_io/_iomodule.c        -       _PyIO_Module    -
 Modules/_sqlite/module.c       -       _sqlite3module  -
 Modules/clinic/md5module.c.h   _md5_md5        _keywords       -

ericsnowcurrently left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Would you mind removing any corresponding variables from ignored.tsv (and/or globals-to-fix.tsv), like the one added in gh-127055? That would help verify that this change is working right.

bedevere-app Bot commented Nov 21, 2024

Copy link
Copy Markdown

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

Copy link
Copy Markdown
Member Author

Ok, the ignore from Victor's PR has been removed. I'll do a more thorough audit of what needs to get un-ignored when I'm more available later today.

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Copy link
Copy Markdown
Member Author

Hmm, this seems like a bedevere bug. This should still have awaiting changes per Eric's review, not awaiting merge.

ericsnowcurrently left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Copy link
Copy Markdown
Member Author

Did a search, and it looks like no other mutexes need to get un-ignored. We're good to merge.

vstinner merged commit 89125e9 into python:main Nov 22, 2024

Copy link
Copy Markdown
Member

Merged, thanks.

ZeroIntensity deleted the static-mutex-in-analyzer branch November 22, 2024 11:20
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL