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/105103] New: RFE: detect bogus use of varargs in analyzer Date: Tue, 29 Mar 2022 20:17:24 +0000 [thread overview] Message-ID: <bug-105103-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105103 Bug ID: 105103 Summary: RFE: detect bogus use of varargs in analyzer Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: dmalcolm at gcc dot gnu.org Target Milestone: --- The analyzer doesn't yet have any handling for the types, macros, functions from <stdarg.h>: https://en.cppreference.com/w/c/variadic https://www.man7.org/linux/man-pages/man3/stdarg.3.html It would be nice to e.g. detect the various undefined behaviors listed in the above e.g. "If ap is passed to a function that uses va_arg(ap,type), then the value of ap is undefined after the return of that function." etc. We could also implement __builtin_va_start, __builtin_va_end, etc and have region_model unpack variadic args in interprocedural calls, effectively inlining the analysis.
next reply other threads:[~2022-03-29 20:17 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-29 20:17 dmalcolm at gcc dot gnu.org [this message] 2022-04-11 14:21 ` [Bug analyzer/105103] " dmalcolm at gcc dot gnu.org 2022-05-16 19:35 ` cvs-commit at gcc dot gnu.org 2022-05-16 19:43 ` 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-105103-4@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).