php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #73951 will break strict-aliasing rules [-Wstrict-aliasing]
Submitted: 2017-01-16 16:51 UTC Modified: -
From: spam2 at rhsoft dot net Assigned:
Status: Open Package: Compile Warning
PHP Version: 7.1.1RC1 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-01-16 16:51 UTC] spam2 at rhsoft dot net
Description:
------------
with "-fstrict-aliasing  -Wstrict-aliasing" you get the warning sbelow and since for -O3 strict-aliasing is default i think that should be really fixed

/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/standard/crypt_sha512.c: In function 'sha512_finish_ctx':
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/standard/crypt_sha512.c:267:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  *(uint64_t *) &ctx->buffer[bytes + pad + 8] = SWAP(ctx->total[0] << 3);
  ^
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/standard/crypt_sha512.c:268:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  *(uint64_t *) &ctx->buffer[bytes + pad] = SWAP((ctx->total[1] << 3) |
  ^
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/standard/crypt_sha256.c: In function 'sha256_finish_ctx':
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/standard/crypt_sha256.c:240:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  *(uint32_t *) &ctx->buffer[bytes + pad + 4] = SWAP (ctx->total[0] << 3);
  ^
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/standard/crypt_sha256.c:241:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  *(uint32_t *) &ctx->buffer[bytes + pad] = SWAP ((ctx->total[1] << 3) |
  ^
/home/builduser/rpmbuild/BUILD/php-7.1.1/main/php_ini.c: In function 'php_init_config':
/home/builduser/rpmbuild/BUILD/php-7.1.1/main/php_ini.c:697:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     strlcat(php_ini_scanned_files, *(char **)element->data, total_l);
     ^~~~~~~

/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/hash/hash_tiger.c: In function 'TigerFinalize':
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/hash/hash_tiger.c:151:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   tiger_compress(context->passes, ((uint64_t *) context->buffer), context->state);
   ^~~~~~~~~~~~~~
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/hash/hash_tiger.c:169:2: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
  tiger_compress(context->passes, ((uint64_t *) context->buffer), context->state);
  ^~~~~~~~~~~~~~
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/hash/hash_tiger.c: In function 'PHP_TIGERUpdate':
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/hash/hash_tiger.c:209:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
    tiger_compress(context->passes, ((const uint64_t *) context->buffer), context->state);
    ^~~~~~~~~~~~~~
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/hash/hash_tiger.c:216:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
    tiger_compress(context->passes, ((const uint64_t *) context->buffer), context->state);
    ^~~~~~~~~~~~~~

/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c: In function '_php_iconv_strpos':
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1055:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     if (_php_iconv_memequal(buf, ndl_buf_p, sizeof(buf))) {
     ^~
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1055:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1073:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
       if (_php_iconv_memequal(&ZSTR_VAL(ndl_buf)[j], &ZSTR_VAL(ndl_buf)[i],
       ^~
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1073:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1073:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1073:7: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1083:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
      if (_php_iconv_memequal(buf, &ZSTR_VAL(ndl_buf)[i], sizeof(buf))) {
      ^~
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1083:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1083:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1083:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1096:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
    if (_php_iconv_memequal(buf, ndl_buf_p, sizeof(buf))) {
    ^~
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1096:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1116:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
      if (_php_iconv_memequal(&ZSTR_VAL(ndl_buf)[j], &ZSTR_VAL(ndl_buf)[i],
      ^~
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1116:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1116:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1116:6: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1126:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     if (_php_iconv_memequal(buf, &ZSTR_VAL(ndl_buf)[i], sizeof(buf))) {
     ^~
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1126:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1126:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/iconv/iconv.c:1126:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]

/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/phar/tar.c: In function 'phar_tar_flush':
/home/builduser/rpmbuild/BUILD/php-7.1.1/ext/phar/tar.c:1249:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
   PHAR_SET_32(sigbuf, phar->sig_flags);
   ^~~~~~~~~~~



Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Nov 12 23:01:34 2019 UTC