From: Alexander Monakov <amonakov@ispras.ru>
To: musl@lists.openwall.com
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Subject: Re: [PATCH] Add format attribute to some function declarations
Date: Sun, 24 Jan 2016 00:05:36 +0300 (MSK) [thread overview]
Message-ID: <alpine.LNX.2.20.1601240001510.10131@monopod.intra.ispras.ru> (raw)
In-Reply-To: <1453581976-10098-1-git-send-email-hauke@hauke-m.de>
On Sat, 23 Jan 2016, Hauke Mehrtens wrote:
> GCC and Clang are able to check the format arguments given to a
> function and warn the user if there is a error in the format arguments
> or if there is a potential uncontrolled format string security problem
> in the code. GCC does this automatically for some functions like
> printf(), but it is also possible to annotate other functions in a way
> that it will check them too. This feature is used by glibc for many
> functions. This patch adds the attribute to the some functions of musl
> expect for these functions where gcc automatically adds it.
Here's how a similar change was done the last time around:
http://git.musl-libc.org/cgit/musl/commit/?id=ccc71e0ea881b7f6594ed95afd706442829c39fc
Note that that approach avoids repeating #ifdef __GNUC__ ...
How did you choose which functions from stdio.h to annotate? Are you saying
that gcc is unaware of snprintf while it recognizes sprintf?
Thanks.
Alexander
next prev parent reply other threads:[~2016-01-23 21:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-23 20:46 Hauke Mehrtens
2016-01-23 21:05 ` Alexander Monakov [this message]
2016-01-23 21:30 ` Hauke Mehrtens
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=alpine.LNX.2.20.1601240001510.10131@monopod.intra.ispras.ru \
--to=amonakov@ispras.ru \
--cc=hauke@hauke-m.de \
--cc=musl@lists.openwall.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).