public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/107646] RFE: can we reimplement gcc-python-plugin's cpychecker as a -fanalyzer plugin? Date: Thu, 17 Aug 2023 18:45:28 +0000 [thread overview] Message-ID: <bug-107646-4-pMeLG76ocO@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107646-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107646 --- Comment #5 from David Malcolm <dmalcolm at gcc dot gnu.org> --- How precisely to track behavior of API entrypoints? We can’t implement known_functions that precisely model every entrypoint. Consider: https://docs.python.org/3/c-api/dict.html#c.PyDict_SetItem which has: Insert val into the dictionary p with a key of key. key must be hashable; if it isn’t, TypeError will be raised. Return 0 on success or -1 on failure. This function does not steal a reference to val. How much of this could be expressed via function attributes, rather than known_function subclasses? List of 20 most commonly used CPython API entrypoints from my 2013 survey: https://fedorapeople.org/~dmalcolm/presentations/PyCon-US-2013/PyCon-US-2013-dmalcolm-StaticAnalysis.html#(25)
next prev parent reply other threads:[~2023-08-17 18:45 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-11 16:55 [Bug analyzer/107646] New: " dmalcolm at gcc dot gnu.org 2022-11-11 16:58 ` [Bug analyzer/107646] " dmalcolm at gcc dot gnu.org 2023-08-02 20:59 ` cvs-commit at gcc dot gnu.org 2023-08-11 17:33 ` cvs-commit at gcc dot gnu.org 2023-08-17 18:26 ` dmalcolm at gcc dot gnu.org 2023-08-17 18:45 ` dmalcolm at gcc dot gnu.org [this message] 2023-08-17 18:53 ` dmalcolm at gcc dot gnu.org 2023-08-17 18:53 ` dmalcolm at gcc dot gnu.org 2023-08-17 18:59 ` dmalcolm at gcc dot gnu.org 2023-08-17 19:46 ` dmalcolm at gcc dot gnu.org 2023-08-18 0:39 ` dmalcolm at gcc dot gnu.org 2023-08-30 22:06 ` cvs-commit at gcc dot gnu.org 2024-05-14 13:51 ` dmalcolm at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-107646-4-pMeLG76ocO@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).