php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78437 warnings that should be fixed in 7.4-GIT
Submitted: 2019-08-21 14:07 UTC Modified: 2019-10-24 10:05 UTC
From: phpbugreports at gmail dot com Assigned:
Status: Duplicate Package: Compile Warning
PHP Version: 7.4Git-2019-08-21 (Git) OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: phpbugreports at gmail dot com
New email:
PHP Version: OS:

 

 [2019-08-21 14:07 UTC] phpbugreports at gmail dot com
Description:
------------
In file included from php-7.4.0/Zend/zend_types.h:25,
                 from php-7.4.0/Zend/zend.h:27,
                 from php-7.4.0/main/php.h:33,
                 from php-7.4.0/ext/intl/collator/collator_is_numeric.h:21,
                 from php-7.4.0/ext/intl/collator/collator_is_numeric.c:18:
php-7.4.0/ext/intl/collator/collator_is_numeric.c: In function 'collator_u_strtod':
php-7.4.0/Zend/zend_portability.h:369:10: warning: 'use_heap' may be used uninitialized in this function [-Wmaybe-uninitialized]
  do { if (UNEXPECTED(use_heap)) efree(p); } while (0)
          ^
php-7.4.0/ext/intl/collator/collator_is_numeric.c:74:15: note: 'use_heap' was declared here
   ALLOCA_FLAG(use_heap);
               ^~~~~~~~
php-7.4.0/Zend/zend_portability.h:361:12: note: in definition of macro 'ALLOCA_FLAG'
  zend_bool name;
            ^~~~
In file included from php-7.4.0/Zend/zend.h:30,
                 from php-7.4.0/main/php.h:33,
                 from php-7.4.0/ext/phar/phar_internal.h:25,
                 from php-7.4.0/ext/phar/phar.c:21:
php-7.4.0/ext/phar/phar.c: In function 'phar_flush':
php-7.4.0/Zend/zend_alloc.h:195:48: warning: 'suser_stub' may be used uninitialized in this function [-Wmaybe-uninitialized]
 #define pefree(ptr, persistent)  ((persistent)?free(ptr):efree(ptr))
                                                ^~~~
php-7.4.0/ext/phar/phar.c:2560:16: note: 'suser_stub' was declared here
   zend_string *suser_stub;
                ^~~~~~~~~~
php-7.4.0/ext/sockets/sockets.c: In function 'zm_startup_sockets':
php-7.4.0/ext/sockets/sockets.c:853:13: warning: AI_IDN_ALLOW_UNASSIGNED is deprecated
  REGISTER_LONG_CONSTANT("AI_IDN_ALLOW_UNASSIGNED",  AI_IDN_ALLOW_UNASSIGNED, CONST_CS | CONST_PERSISTENT);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
php-7.4.0/ext/sockets/sockets.c:854:13: warning: AI_IDN_USE_STD3_ASCII_RULES is deprecated
  REGISTER_LONG_CONSTANT("AI_IDN_USE_STD3_ASCII_RULES", AI_IDN_USE_STD3_ASCII_RULES, CONST_CS | CONST_PERSISTENT);
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
php-7.4.0/sapi/cli/php_cli.c: In function 'sapi_cli_select':
php-7.4.0/sapi/cli/php_cli.c:251:25: warning: passing argument 2 to restrict-qualified parameter aliases with argument 4 [-Wrestrict]
  ret = php_select(fd+1, &dfd, &wfd, &dfd, &tv);
                         ^~~~        ~~~~
php-7.4.0/sapi/cli/php_cli.c:85:46: note: in definition of macro 'php_select'
 # define php_select(m, r, w, e, t) select(m, r, w, e, t)
                                              ^
Zend/zend_ini_scanner.l: In function 'ini_lex':
Zend/zend_ini_scanner.c:520:18: warning: 'yych' may be used uninitialized in this function [-Wmaybe-uninitialized]
    goto *yytarget[yych];
          ~~~~~~~~^~~~~~
Zend/zend_ini_scanner.c:388:10: note: 'yych' was declared here
  YYCTYPE yych;
          ^~~~
Zend/zend_language_scanner.l: In function 'lex_scan':
Zend/zend_language_scanner.c:1860:18: warning: 'yych' may be used uninitialized in this function [-Wmaybe-uninitialized]
    goto *yytarget[yych];
          ~~~~~~~~^~~~~~
Zend/zend_language_scanner.c:1254:10: note: 'yych' was declared here
  YYCTYPE yych;
          ^~~~



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-08-21 14:22 UTC] nikic@php.net
Which gcc version do you use?
 [2019-08-21 14:37 UTC] phpbugreports at gmail dot com
gcc-8.3.1-2.fc29.x86_64

make --quiet -j6 prof-gen

CFLAGS='-m64 -O3 -mfpmath=sse -msse2avx -mavx -march=sandybridge -mtune=sandybridge -D_FORTIFY_SOURCE=2 -g0 -pipe -fstack-protector-strong --param=ssp-buffer-size=8 -falign-functions -falign-jumps -falign-loops -falign-labels -flimit-function-alignment -fdce -fdse -fexpensive-optimizations -fgraphite-identity -fipa-cp-clone -floop-unroll-and-jam -fmove-loop-invariants -fomit-frame-pointer  -foptimize-strlen -fpeel-loops -fsemantic-interposition -fsplit-loops -fsplit-paths -fstrict-aliasing -ftree-ch -ftree-dce -ftree-dse -ftree-loop-distribution -ftree-loop-if-convert -ftree-loop-if-convert-stores -ftree-loop-im -ftree-loop-ivcanon -ftree-pre -ftree-partial-pre -ftree-vectorize -ftree-loop-vectorize -ftree-slp-vectorize -funroll-loops -funswitch-loops -fvariable-expansion-in-unroller -fsimd-cost-model=unlimited -fvect-cost-model=unlimited -fwrapv -fno-exceptions -fno-gcse -fno-math-errno -Wformat -Werror=format-security -Wno-stack-protector -Wno-deprecated-declarations -Wstrict-aliasing -Wa,--noexecstack'
CC='gcc -m64 -O3 -mfpmath=sse -msse2avx -mavx -march=sandybridge -mtune=sandybridge -D_FORTIFY_SOURCE=2 -g0 -pipe -fstack-protector-strong --param=ssp-buffer-size=8 -falign-functions -falign-jumps -falign-loops -falign-labels -flimit-function-alignment -fdce -fdse -fexpensive-optimizations -fgraphite-identity -fipa-cp-clone -floop-unroll-and-jam -fmove-loop-invariants -fomit-frame-pointer  -foptimize-strlen -fpeel-loops -fsemantic-interposition -fsplit-loops -fsplit-paths -fstrict-aliasing -ftree-ch -ftree-dce -ftree-dse -ftree-loop-distribution -ftree-loop-if-convert -ftree-loop-if-convert-stores -ftree-loop-im -ftree-loop-ivcanon -ftree-pre -ftree-partial-pre -ftree-vectorize -ftree-loop-vectorize -ftree-slp-vectorize -funroll-loops -funswitch-loops -fvariable-expansion-in-unroller -fsimd-cost-model=unlimited -fvect-cost-model=unlimited -fwrapv -fno-exceptions -fno-gcse -fno-math-errno -Wformat -Werror=format-security -Wno-stack-protector -Wno-deprecated-declarations -Wstrict-aliasing -Wa,--noexecstack'
CXXFLAGS='-m64 -O3 -mfpmath=sse -msse2avx -mavx -march=sandybridge -mtune=sandybridge -D_FORTIFY_SOURCE=2 -g0 -pipe -fstack-protector-strong --param=ssp-buffer-size=8 -falign-functions -falign-jumps -falign-loops -falign-labels -flimit-function-alignment -fdce -fdse -fexpensive-optimizations -fgraphite-identity -fipa-cp-clone -floop-unroll-and-jam -fmove-loop-invariants -fomit-frame-pointer  -foptimize-strlen -fpeel-loops -fsemantic-interposition -fsplit-loops -fsplit-paths -fstrict-aliasing -ftree-ch -ftree-dce -ftree-dse -ftree-loop-distribution -ftree-loop-if-convert -ftree-loop-if-convert-stores -ftree-loop-im -ftree-loop-ivcanon -ftree-pre -ftree-partial-pre -ftree-vectorize -ftree-loop-vectorize -ftree-slp-vectorize -funroll-loops -funswitch-loops -fvariable-expansion-in-unroller -fsimd-cost-model=unlimited -fvect-cost-model=unlimited -fwrapv -fno-exceptions -fno-gcse -fno-math-errno -Wformat -Werror=format-security -Wno-stack-protector -Wno-deprecated-declarations -Wstrict-aliasing -Wa,--noexecstack'
CPPFLAGS='-m64 -O3 -mfpmath=sse -msse2avx -mavx -march=sandybridge -mtune=sandybridge -D_FORTIFY_SOURCE=2 -g0 -pipe -fstack-protector-strong --param=ssp-buffer-size=8 -falign-functions -falign-jumps -falign-loops -falign-labels -flimit-function-alignment -fdce -fdse -fexpensive-optimizations -fgraphite-identity -fipa-cp-clone -floop-unroll-and-jam -fmove-loop-invariants -fomit-frame-pointer  -foptimize-strlen -fpeel-loops -fsemantic-interposition -fsplit-loops -fsplit-paths -fstrict-aliasing -ftree-ch -ftree-dce -ftree-dse -ftree-loop-distribution -ftree-loop-if-convert -ftree-loop-if-convert-stores -ftree-loop-im -ftree-loop-ivcanon -ftree-pre -ftree-partial-pre -ftree-vectorize -ftree-loop-vectorize -ftree-slp-vectorize -funroll-loops -funswitch-loops -fvariable-expansion-in-unroller -fsimd-cost-model=unlimited -fvect-cost-model=unlimited -fwrapv -fno-exceptions -fno-gcse -fno-math-errno -Wformat -Werror=format-security -Wno-stack-protector -Wno-deprecated-declarations -Wstrict-aliasing -Wa,--noexecstack'
CXX='gcc -m64 -O3 -mfpmath=sse -msse2avx -mavx -march=sandybridge -mtune=sandybridge -D_FORTIFY_SOURCE=2 -g0 -pipe -fstack-protector-strong --param=ssp-buffer-size=8 -falign-functions -falign-jumps -falign-loops -falign-labels -flimit-function-alignment -fdce -fdse -fexpensive-optimizations -fgraphite-identity -fipa-cp-clone -floop-unroll-and-jam -fmove-loop-invariants -fomit-frame-pointer  -foptimize-strlen -fpeel-loops -fsemantic-interposition -fsplit-loops -fsplit-paths -fstrict-aliasing -ftree-ch -ftree-dce -ftree-dse -ftree-loop-distribution -ftree-loop-if-convert -ftree-loop-if-convert-stores -ftree-loop-im -ftree-loop-ivcanon -ftree-pre -ftree-partial-pre -ftree-vectorize -ftree-loop-vectorize -ftree-slp-vectorize -funroll-loops -funswitch-loops -fvariable-expansion-in-unroller -fsimd-cost-model=unlimited -fvect-cost-model=unlimited -fwrapv -fno-exceptions -fno-gcse -fno-math-errno -Wformat -Werror=format-security -Wno-stack-protector -Wno-deprecated-declarations -Wstrict-aliasing -Wa,--noexecstack'
SH_LDFLAGS='-Wl,--as-needed -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Wl,-z,nodump -m64 -O3 -mfpmath=sse -msse2avx -mavx -march=sandybridge -mtune=sandybridge -D_FORTIFY_SOURCE=2 -g0 -pipe -fstack-protector-strong --param=ssp-buffer-size=8 -falign-functions -falign-jumps -falign-loops -falign-labels -flimit-function-alignment -fdce -fdse -fexpensive-optimizations -fgraphite-identity -fipa-cp-clone -floop-unroll-and-jam -fmove-loop-invariants -fomit-frame-pointer  -foptimize-strlen -fpeel-loops -fsemantic-interposition -fsplit-loops -fsplit-paths -fstrict-aliasing -ftree-ch -ftree-dce -ftree-dse -ftree-loop-distribution -ftree-loop-if-convert -ftree-loop-if-convert-stores -ftree-loop-im -ftree-loop-ivcanon -ftree-pre -ftree-partial-pre -ftree-vectorize -ftree-loop-vectorize -ftree-slp-vectorize -funroll-loops -funswitch-loops -fvariable-expansion-in-unroller -fsimd-cost-model=unlimited -fvect-cost-model=unlimited -fwrapv -fno-exceptions -fno-gcse -fno-math-errno -Wformat -Werror=format-security -Wno-stack-protector -Wno-deprecated-declarations -Wstrict-aliasing -Wa,--noexecstack'
LDFLAGS='-Wl,--as-needed -Wl,-z,now -Wl,-z,relro -Wl,-z,noexecstack -Wl,-z,nodump -m64 -O3 -mfpmath=sse -msse2avx -mavx -march=sandybridge -mtune=sandybridge -D_FORTIFY_SOURCE=2 -g0 -pipe -fstack-protector-strong --param=ssp-buffer-size=8 -falign-functions -falign-jumps -falign-loops -falign-labels -flimit-function-alignment -fdce -fdse -fexpensive-optimizations -fgraphite-identity -fipa-cp-clone -floop-unroll-and-jam -fmove-loop-invariants -fomit-frame-pointer  -foptimize-strlen -fpeel-loops -fsemantic-interposition -fsplit-loops -fsplit-paths -fstrict-aliasing -ftree-ch -ftree-dce -ftree-dse -ftree-loop-distribution -ftree-loop-if-convert -ftree-loop-if-convert-stores -ftree-loop-im -ftree-loop-ivcanon -ftree-pre -ftree-partial-pre -ftree-vectorize -ftree-loop-vectorize -ftree-slp-vectorize -funroll-loops -funswitch-loops -fvariable-expansion-in-unroller -fsimd-cost-model=unlimited -fvect-cost-model=unlimited -fwrapv -fno-exceptions -fno-gcse -fno-math-errno -Wformat -Werror=format-security -Wno-stack-protector -Wno-deprecated-declarations -Wstrict-aliasing -Wa,--noexecstack -pie -fPIE'
 [2019-08-23 14:35 UTC] nikic@php.net
PR for GCC 8 warnings: https://github.com/php/php-src/pull/4612

PR that removes deprecated AI flags: https://github.com/php/php-src/pull/4492 -- needs more work.

The maybe-uninitialized regressions are likely new in GCC 9, which I don't have.
 [2019-10-24 10:05 UTC] nikic@php.net
-Status: Open +Status: Duplicate
 [2019-10-24 10:05 UTC] nikic@php.net
Closing this in favor of bug #78566, which reports a larger set of warning.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 06 05:01:29 2024 UTC