Skip to content

gcc 12 warnings #5154

Closed
Closed
@ghost

Description

gcc (GCC) 12.1.1 20220507 (Red Hat 12.1.1-1)

I updated (some) CI builders to Fedora 36 (it is a --disable-openmp build)

Configure finished.  Now "make -s clean && make -sj4" to compile.
ar: creating aes.a
ar: creating poly1305-donna.a
ar: creating secp256k1.a
ar: creating ed25519-donna.a
pkcs12_plug.c: In function 'mbedtls_pkcs12_derivation_simd_sha1':
pkcs12_plug.c:448:9: error: 'pkcs12_fill_salt_buffer_simd' accessing 26880 bytes in a region of size 128 [-Werror=stringop-overflow=]
  448 |         pkcs12_fill_salt_buffer_simd(salt_block, v, salt, saltlen, SSE_GROUP_SZ_SHA1);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:448:9: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:375:13: note: in a call to function 'pkcs12_fill_salt_buffer_simd'
  375 | static void pkcs12_fill_salt_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:449:9: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 128 [-Werror=stringop-overflow=]
  449 |         pkcs12_fill_buffer_simd(pwd_block,  v, pwd,  pwdlen, SSE_GROUP_SZ_SHA1);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:449:9: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:449:9: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 128 [-Werror=stringop-overflow=]
pkcs12_plug.c:449:9: note: referencing argument 3 of type 'const unsigned char *[3360]'
pkcs12_plug.c:449:9: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 128 [-Werror=stringop-overflow=]
pkcs12_plug.c:449:9: note: referencing argument 4 of type 'size_t[3360]' {aka 'long unsigned int[3360]'}
pkcs12_plug.c:396:13: note: in a call to function 'pkcs12_fill_buffer_simd'
  396 | static void pkcs12_fill_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:497:17: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 128 [-Werror=stringop-overflow=]
  497 |                 pkcs12_fill_buffer_simd( hash_block, v, (const unsigned char**)hash_output, hlens, SSE_GROUP_SZ_SHA1);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:497:17: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:497:17: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 128 [-Werror=stringop-overflow=]
pkcs12_plug.c:497:17: note: referencing argument 3 of type 'const unsigned char *[3360]'
pkcs12_plug.c:497:17: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 128 [-Werror=stringop-overflow=]
pkcs12_plug.c:497:17: note: referencing argument 4 of type 'size_t[3360]' {aka 'long unsigned int[3360]'}
pkcs12_plug.c:396:13: note: in a call to function 'pkcs12_fill_buffer_simd'
  396 | static void pkcs12_fill_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c: In function 'mbedtls_pkcs12_derivation_simd_sha256':
pkcs12_plug.c:556:9: error: 'pkcs12_fill_salt_buffer_simd' accessing 26880 bytes in a region of size 128 [-Werror=stringop-overflow=]
  556 |         pkcs12_fill_salt_buffer_simd(salt_block, v, salt, saltlen, SSE_GROUP_SZ_SHA256);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:556:9: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:375:13: note: in a call to function 'pkcs12_fill_salt_buffer_simd'
  375 | static void pkcs12_fill_salt_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:557:9: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 128 [-Werror=stringop-overflow=]
  557 |         pkcs12_fill_buffer_simd(pwd_block,  v, pwd,  pwdlen, SSE_GROUP_SZ_SHA256);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:557:9: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:557:9: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 128 [-Werror=stringop-overflow=]
pkcs12_plug.c:557:9: note: referencing argument 3 of type 'const unsigned char *[3360]'
pkcs12_plug.c:557:9: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 128 [-Werror=stringop-overflow=]
pkcs12_plug.c:557:9: note: referencing argument 4 of type 'size_t[3360]' {aka 'long unsigned int[3360]'}
pkcs12_plug.c:396:13: note: in a call to function 'pkcs12_fill_buffer_simd'
  396 | static void pkcs12_fill_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:605:17: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 128 [-Werror=stringop-overflow=]
  605 |                 pkcs12_fill_buffer_simd( hash_block, v, (const unsigned char**)hash_output, hlens, SSE_GROUP_SZ_SHA256);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:605:17: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:605:17: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 128 [-Werror=stringop-overflow=]
pkcs12_plug.c:605:17: note: referencing argument 3 of type 'const unsigned char *[3360]'
pkcs12_plug.c:605:17: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 128 [-Werror=stringop-overflow=]
pkcs12_plug.c:605:17: note: referencing argument 4 of type 'size_t[3360]' {aka 'long unsigned int[3360]'}
pkcs12_plug.c:396:13: note: in a call to function 'pkcs12_fill_buffer_simd'
  396 | static void pkcs12_fill_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c: In function 'mbedtls_pkcs12_derivation_simd_sha512':
pkcs12_plug.c:705:9: error: 'pkcs12_fill_salt_buffer_simd' accessing 26880 bytes in a region of size 64 [-Werror=stringop-overflow=]
  705 |         pkcs12_fill_salt_buffer_simd(salt_block, v, salt, saltlen, SSE_GROUP_SZ_SHA512);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:705:9: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:375:13: note: in a call to function 'pkcs12_fill_salt_buffer_simd'
  375 | static void pkcs12_fill_salt_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:706:9: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Werror=stringop-overflow=]
  706 |         pkcs12_fill_buffer_simd(pwd_block,  v, pwd,  pwdlen, SSE_GROUP_SZ_SHA512);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:706:9: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:706:9: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Werror=stringop-overflow=]
pkcs12_plug.c:706:9: note: referencing argument 3 of type 'const unsigned char *[3360]'
pkcs12_plug.c:706:9: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Werror=stringop-overflow=]
pkcs12_plug.c:706:9: note: referencing argument 4 of type 'size_t[3360]' {aka 'long unsigned int[3360]'}
pkcs12_plug.c:396:13: note: in a call to function 'pkcs12_fill_buffer_simd'
  396 | static void pkcs12_fill_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:753:17: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Werror=stringop-overflow=]
  753 |                 pkcs12_fill_buffer_simd( hash_block, v, (const unsigned char**)hash_output, hlens, SSE_GROUP_SZ_SHA512 );
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pkcs12_plug.c:753:17: note: referencing argument 1 of type 'unsigned char *[3360]'
pkcs12_plug.c:753:17: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Werror=stringop-overflow=]
pkcs12_plug.c:753:17: note: referencing argument 3 of type 'const unsigned char *[3360]'
pkcs12_plug.c:753:17: error: 'pkcs12_fill_buffer_simd' accessing 26880 bytes in a region of size 64 [-Werror=stringop-overflow=]
pkcs12_plug.c:753:17: note: referencing argument 4 of type 'size_t[3360]' {aka 'long unsigned int[3360]'}
pkcs12_plug.c:396:13: note: in a call to function 'pkcs12_fill_buffer_simd'
  396 | static void pkcs12_fill_buffer_simd(unsigned char *data[SIMD_MAX_GROUP_PFX], size_t data_len,
      |             ^~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [Makefile:1556: pkcs12_plug.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:190: default] Error 2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions