Mbed-TLS / mbedtls

An open source, portable, easy to use, readable and flexible TLS library, and reference implementation of the PSA Cryptography API. Releases are on a varying cadence, typically around 3 - 6 months between releases.
https://www.trustedfirmware.org/projects/mbed-tls/
Other
5.5k stars 2.6k forks source link

build failure on ppc64el, with gcc-14 and O3 (stringop-overflow) #9743

Open LocutusOfBorg opened 2 hours ago

LocutusOfBorg commented 2 hours ago

Hello, looks like we are facing a new issue on ppc64el with -O3, please check the Ubuntu log

https://launchpadlibrarian.net/756581240/buildlog_ubuntu-plucky-ppc64el.mbedtls_3.6.2-1ubuntu1_BUILDING.txt.gz Version is 3.6.2 + a41747ac8e824b5cb9ed6874a688a4d5a578e10c

cd /<>/obj-powerpc64le-linux-gnu/library && /usr/bin/cc -I/<>/include -I/<>/library -I/<>/obj-powerpc64le-linux-gnu/library -g -O3 -Werror=implicit-function-declaration -Werror=array-bounds -Werror=clobbered -Werror=volatile-register-var -DDEB_CANARY_CFLAGS_ed4227734ed75d343320b6a5fd16ce57 -fno-omit-frame-pointer -ffile-prefix-map=/<>=. -fstack-protector-strong -Wformat -Werror=format-security -fno-stack-clash-protection -fdebug-prefix-map=/<>=/usr/src/mbedtls-3.6.2-1ubuntu1 -DDEB_CANARY_CPPFLAGS_ed4227734ed75d343320b6a5fd16ce57 -Wdate-time -D_FORTIFY_SOURCE=3 -Wall -Wextra -Wwrite-strings -Wmissing-prototypes -Wformat=2 -Wno-format-nonliteral -Wvla -Wlogical-op -Wshadow -Wformat-signedness -Wformat-overflow=2 -Wformat-truncation -Werror -Wmissing-declarations -std=c99 -MD -MT library/CMakeFiles/mbedcrypto_static.dir/ctr_drbg.c.o -MF CMakeFiles/mbedcrypto_static.dir/ctr_drbg.c.o.d -o CMakeFiles/mbedcrypto_static.dir/ctr_drbg.c.o -c /<>/library/ctr_drbg.c In file included from /<>/library/cmac.c:29: In function ‘mbedtls_xor’, inlined from ‘mbedtls_cipher_cmac_finish’ at /<>/library/cmac.c:305:5: /<>/library/common.h:235:14: error: writing 1 byte into a region of size 0 [-Werror=stringop-overflow=] 235 | r[i] = a[i] ^ b[i]; | ~^~~~~ In file included from /<>/include/mbedtls/cmac.h:17, from /<>/library/cmac.c:33: /<>/include/mbedtls/cmac.h: In function ‘mbedtls_cipher_cmac_finish’: /<>/include/mbedtls/cmac.h:61:41: note: at offset 16 into destination object ‘state’ of size 16 61 | unsigned char MBEDTLS_PRIVATE(state)[MBEDTLS_CMAC_MAX_BLOCK_SIZE]; | ^~~~~ /<>/include/mbedtls/private_access.h:17:33: note: in definition of macro ‘MBEDTLS_PRIVATE’ 17 | #define MBEDTLS_PRIVATE(member) member

thanks!

LocutusOfBorg commented 2 hours ago

https://github.com/openwrt/openwrt/pull/15479/commits/a41747ac8e824b5cb9ed6874a688a4d5a578e10c