Skip Menu |

This queue is for tickets about the Future-AsyncAwait CPAN distribution.

Report information
The Basics
Id: 130285
Status: resolved
Priority: 0/
Queue: Future-AsyncAwait

People
Owner: Nobody in particular
Requestors: gregoa [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.31
Fixed in: 0.32



Subject: build failure (with -Werror=format-security)
When trying to update Future-AsyncAwait to 0.31 in Debian, I noticed a compiler error (actually a warning that is treated as an error by Debian's default gcc flags): perl Build Building Future-AsyncAwait x86_64-linux-gnu-gcc -I/usr/lib/x86_64-linux-gnu/perl/5.28/CORE -DVERSION="0.31" -DXS_VERSION="0.31" -fPIC -std=c89 -Ihax -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O2 -fdebug-prefix-map=/build/libfuture-asyncawait-perl-0.31=. -fstack-protector-strong -Wformat -Werror=format-security -g -O2 -fdebug-prefix-map=/build/libfuture-asyncawait-perl-0.31=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -o lib/Future/AsyncAwait.o lib/Future/AsyncAwait.c In file included from lib/Future/AsyncAwait.xs:21: hax/parse_subsignature.c.inc: In function 'S_yyerror': hax/parse_subsignature.c.inc:34:22: warning: format '%ld' expects argument of type 'long int', but argument 5 has type 'line_t' {aka 'unsigned int'} [-Wformat=] sv_catpvf(message, "%s at %s line %" IVdf, ^~~~~~~~~~~~~~~~~ hax/parse_subsignature.c.inc:44:3: error: format not a string literal and no format arguments [-Werror=format-security] warn(SvPVX(message)); ^~~~ cc1: some warnings being treated as errors error building lib/Future/AsyncAwait.o from 'lib/Future/AsyncAwait.c' at /usr/share/perl/5.28/ExtUtils/CBuilder/Base.pm line 185.
Thanks. Both now fixed in source; will be in next CPAN release (either 0.31_002 or 0.32) -- Paul Evans
Subject: rt130285.patch
=== modified file 'hax/parse_subsignature.c.inc' --- hax/parse_subsignature.c.inc 2019-07-24 22:37:35 +0000 +++ hax/parse_subsignature.c.inc 2019-08-12 15:33:39 +0000 @@ -32,7 +32,7 @@ STRLEN contlen = PL_parser->bufptr - PL_parser->oldbufptr; sv_catpvf(message, "%s at %s line %" IVdf, - s, OutCopFILE(PL_curcop), CopLINE(PL_curcop)); + s, OutCopFILE(PL_curcop), (IV)CopLINE(PL_curcop)); if(context) sv_catpvf(message, ", near \"%" UTF8f "\"", @@ -41,7 +41,7 @@ sv_catpvf(message, "\n"); PL_parser->error_count++; - warn(SvPVX(message)); + warn_sv(message); } /* Stolen from op.c */