|
From: | Ivailo |
Subject: | Re: security format patch |
Date: | Mon, 2 Dec 2013 21:51:00 +0000 |
Yep, it fails for me when building latest diffutils with the latest gnulib.So, if you want to reproduce this pull latest diffutils:git clone --depth=1 git://git.sv.gnu.org/diffutils.gitcd diffutils./bootstrap./configure CFLAGS='-Wformat -Werror=format-security -O2'
make
make checkLooks like gitlib-tool does something wrong and it is unable to catchsuch things. In any case the issue with the security format remains.On Mon, Dec 2, 2013 at 8:15 PM, Ivailo <address@hidden> wrote:
Strange enough, I can't reproduce it either the way you describe.Not even with my usual build flags that I used to build diffutilswhich test suites fails and I saw that it uses gnulib that lead mehere. If you can try to actually build and check diffutils (3.3) maybeyou will be able to reproduce it as I have no idea if diffutils appliessome custom configuration that may lead to the failure but isactually filtered somewhere in gnulib itself (which would be verystrange). I will try to build diffutils from latest git checkout which willbootstrap gnulib to see how that goes.But anyway, patch that uses #pragma attached. As I'm notentirely sure how this will actually work the patch may not be goodenough - I do not know if it will filter "-Wformat-nonliteral" literallyfrom the build flags or the interpretation of it, for an example, ofwhat "-Wformat-security" is supposed to do. So, maybe additionalpragmas, e.g. for "-Wformat", may be needed which will actuallyturn of all format warnings must be used (altough that may not bethe best thing to do).If anyone can come up with better patch and fix the issue that wouldbe great.Cheers!On Mon, Dec 2, 2013 at 7:40 PM, Paul Eggert <address@hidden> wrote:
On 12/02/2013 11:18 AM, Eric Blake wrote:Another possibility is to use obscurer code that GCC
> So the correct fix is the use
> of #pragma GCC diagnostic to shut up the compiler's warning
can't figure out; that's what we did for the empty-string
warning.
I can't reproduce the problem on my
platform (Fedora 19 with its GCC 4.8.2). Here's how I
tried to reproduce it:
./gnulib-tool --create-testdir --dir foo xvasprintf
cd foo
./configure CFLAGS='-Wformat -Werror=format-security -O2'
make
make check
[Prev in Thread] | Current Thread | [Next in Thread] |