New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"-Wformat-overflow=' warnings in sv.c when compiling with gcc or g++ #16843
Comments
From @jkeenanSince we're approaching code freeze, let's call attention to On the FreeBSD-11.2 box where I regularly run smoke-tests of ##### sh ./Configure -des -Dusedevel -Duseithreads -Doptimize="-O2 -pipe sh ./Configure -des -Dusedevel -Duseithreads -Doptimize="-O2 -pipe In each case I recorded the output of 'make test_prep', That left 0 build-time warnings directly attributable to p5p Thank you very much. |
From @jkeenang++ -c -DPERL_CORE -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_FORTIFY_SOURCE=2 -ansi -O2 -pipe -fstack-protector -fno-strict-aliasing -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wwrite-strings sv.c |
From @jkeenangcc -c -DPERL_CORE -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_FORTIFY_SOURCE=2 -std=c89 -O2 -pipe -fstack-protector -fno-strict-aliasing -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings sv.c |
From @jkeenanOn Wed, 06 Feb 2019 19:23:15 GMT, jkeenan@pobox.com wrote:
-- |
From @jkeenanSummary of my perl5 (revision 5 version 29 subversion 8) configuration: Characteristics of this binary (from libperl): |
From [Unknown Contact. See original ticket]On Wed, 06 Feb 2019 19:23:15 GMT, jkeenan@pobox.com wrote:
-- |
From @tonycozOn Wed, 06 Feb 2019 11:23:15 -0800, jkeenan@pobox.com wrote:
I think the warning is a false positive in that the code very carefully checks that the sprintf() result fits into the buffer before using it. That said, using sprintf() (or gcvt(), which is what is used on Linux) is a bit of a code smell. We could fix this pretty easily for this case by modifying the code block around line 43 in sv.c to fallback to using snprintf() if available and only using Gconvert() if it isn't. It won't fix the more general use of Gconvert() though. Tony |
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Thu, 07 Feb 2019 00:54:30 GMT, tonyc wrote:
Whatever you think best. (Beyond my C-fu.) Thank you very much. -- |
Migrated from rt.perl.org#133830 (status was 'open')
Searchable as RT133830$
The text was updated successfully, but these errors were encountered: