intel / cryptography-primitives

Apache License 2.0
319 stars 86 forks source link

Build issue on Fedora 32 #16

Closed ipuustin closed 4 years ago

ipuustin commented 4 years ago

Compiling with the example cmake and make commands gives me this build error on Fedora 32 (gcc (GCC) 10.0.1 20200430 (Red Hat 10.0.1-0.13)):

$ CC=gcc CXX=g++ cmake CMakeLists.txt -B_build -DARCH=intel64
$ cd _build
$ make all

...

[  0%] Building C object sources/ippcp/CMakeFiles/ippcp_s_m7.dir/pcpaes_ccmencrypt.c.o
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:28:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c: In function ‘m7_ippsAES_CCMEncrypt’:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcptool.h:41:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   41 |       d[k] = s[k];
      |       ~~~~~^~~~~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:27:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaesauthccm.h:43:13: note: at offset 0 to object ‘blk’ with size 16 declared here
   43 |    Ipp8u    blk[MBS_RIJ128];  /* temporary data container */
      |             ^~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:28:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcptool.h:41:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   41 |       d[k] = s[k];
      |       ~~~~~^~~~~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:27:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaesauthccm.h:43:13: note: at offset 0 to object ‘blk’ with size 16 declared here
   43 |    Ipp8u    blk[MBS_RIJ128];  /* temporary data container */
      |             ^~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:28:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcptool.h:41:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   41 |       d[k] = s[k];
      |       ~~~~~^~~~~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:27:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaesauthccm.h:43:13: note: at offset 0 to object ‘blk’ with size 16 declared here
   43 |    Ipp8u    blk[MBS_RIJ128];  /* temporary data container */
      |             ^~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:28:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcptool.h:41:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   41 |       d[k] = s[k];
      |       ~~~~~^~~~~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:27:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaesauthccm.h:43:13: note: at offset 0 to object ‘blk’ with size 16 declared here
   43 |    Ipp8u    blk[MBS_RIJ128];  /* temporary data container */
      |             ^~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:28:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcptool.h:41:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   41 |       d[k] = s[k];
      |       ~~~~~^~~~~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:27:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaesauthccm.h:43:13: note: at offset 0 to object ‘blk’ with size 16 declared here
   43 |    Ipp8u    blk[MBS_RIJ128];  /* temporary data container */
      |             ^~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:28:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcptool.h:41:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   41 |       d[k] = s[k];
      |       ~~~~~^~~~~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:27:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaesauthccm.h:43:13: note: at offset 0 to object ‘blk’ with size 16 declared here
   43 |    Ipp8u    blk[MBS_RIJ128];  /* temporary data container */
      |             ^~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:28:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcptool.h:41:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   41 |       d[k] = s[k];
      |       ~~~~~^~~~~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:27:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaesauthccm.h:43:13: note: at offset 0 to object ‘blk’ with size 16 declared here
   43 |    Ipp8u    blk[MBS_RIJ128];  /* temporary data container */
      |             ^~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:28:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcptool.h:41:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   41 |       d[k] = s[k];
      |       ~~~~~^~~~~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:27:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaesauthccm.h:43:13: note: at offset 0 to object ‘blk’ with size 16 declared here
   43 |    Ipp8u    blk[MBS_RIJ128];  /* temporary data container */
      |             ^~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:28:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcptool.h:41:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   41 |       d[k] = s[k];
      |       ~~~~~^~~~~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:27:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaesauthccm.h:43:13: note: at offset 0 to object ‘blk’ with size 16 declared here
   43 |    Ipp8u    blk[MBS_RIJ128];  /* temporary data container */
      |             ^~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:28:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcptool.h:41:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   41 |       d[k] = s[k];
      |       ~~~~~^~~~~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:27:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaesauthccm.h:43:13: note: at offset 0 to object ‘blk’ with size 16 declared here
   43 |    Ipp8u    blk[MBS_RIJ128];  /* temporary data container */
      |             ^~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:28:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcptool.h:41:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   41 |       d[k] = s[k];
      |       ~~~~~^~~~~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:27:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaesauthccm.h:43:13: note: at offset 0 to object ‘blk’ with size 16 declared here
   43 |    Ipp8u    blk[MBS_RIJ128];  /* temporary data container */
      |             ^~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:28:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcptool.h:41:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   41 |       d[k] = s[k];
      |       ~~~~~^~~~~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:27:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaesauthccm.h:43:13: note: at offset 0 to object ‘blk’ with size 16 declared here
   43 |    Ipp8u    blk[MBS_RIJ128];  /* temporary data container */
      |             ^~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:28:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcptool.h:41:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   41 |       d[k] = s[k];
      |       ~~~~~^~~~~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:27:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaesauthccm.h:43:13: note: at offset 0 to object ‘blk’ with size 16 declared here
   43 |    Ipp8u    blk[MBS_RIJ128];  /* temporary data container */
      |             ^~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:28:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcptool.h:41:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   41 |       d[k] = s[k];
      |       ~~~~~^~~~~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:27:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaesauthccm.h:43:13: note: at offset 0 to object ‘blk’ with size 16 declared here
   43 |    Ipp8u    blk[MBS_RIJ128];  /* temporary data container */
      |             ^~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:28:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcptool.h:41:12: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=]
   41 |       d[k] = s[k];
      |       ~~~~~^~~~~~
In file included from /home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaes_ccmencrypt.c:27:
/home/ipuustin/git/ipp-crypto/sources/ippcp/pcpaesauthccm.h:43:13: note: at offset 0 to object ‘blk’ with size 16 declared here
   43 |    Ipp8u    blk[MBS_RIJ128];  /* temporary data container */
      |             ^~~
cc1: all warnings being treated as errors
make[2]: *** [sources/ippcp/CMakeFiles/ippcp_s_m7.dir/build.make:525: sources/ippcp/CMakeFiles/ippcp_s_m7.dir/pcpaes_ccmencrypt.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:210: sources/ippcp/CMakeFiles/ippcp_s_m7.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
FLTLN commented 4 years ago

Hello Ismo,

Thank you for drawing our attention to this issue. We will investigate it.

Regards, Maksim

FLTLN commented 4 years ago

Hello Ismo,

We are investigated and fixed this issue. These warnings are all false positive, but despite this we made changes in our sources to remove them. Updates in repository will be available soon. Thank you for you interest to IPP Crypto.

Regards, Maksim

FLTLN commented 4 years ago

Hello Ismo,

Fix is available now.

Regards, Maksim