libtpms/src
Arthur Gautier 2d9b00c4e4 tpm2: fix GCC 15 stringop-overflow error in MakeIv
When compiling with GCC 15 using `CFLAGS=-march=x86-64-v4`, the compiler's
aggressively optimized vectorizer triggers a false-positive
-Wstringop-overflow error. Because x86-64-v4 enables wide AVX-512 registers,
the compiler misinterprets the loop unrolling and warns that a 64-byte
vector write is overflowing the destination buffer:
```
  tpm2/TPMCmd/tpm/src/crypt/AlgorithmTests.c:158:17: error: 
  writing 64 bytes into a region of size 15 [-Werror=stringop-overflow=]
    158 |             *iv = i;
```

This fixes the warning by marking the `iv` output pointer parameter as
`volatile`. This inhibits the over-aggressive loop vectorization on this
specific buffer, silencing the compiler error without changing the
underlying logic.

Signed-off-by: Arthur Gautier <arthur.gautier@arista.com>
2026-06-10 22:31:26 -04:00
..
tpm2 tpm2: fix GCC 15 stringop-overflow error in MakeIv 2026-06-10 22:31:26 -04:00
tpm12 tpm12: libtpms on OpenBSD no longer builds with OPENSSL_OLD_API. 2026-06-08 11:02:00 -04:00
compiler.h tpm2: Remove unused function parameters or mark them as unused 2024-09-24 09:32:02 -04:00
disabled_interface.c tpm2: Remove unused function parameters or mark them as unused 2024-09-24 09:32:02 -04:00
libtpms.syms tpm2: Implement TPMLIB_WasManufactured API call 2024-08-30 16:25:47 -04:00
Makefile.am build-sys: Fixup prerequisites on OpenBSD, remove outdated casing. 2026-06-08 11:02:00 -04:00
test.syms build-sys: work around broken linker when testing --version-script support 2018-08-30 21:45:16 +00:00
tpm_debug.c Move common debug, memory & nvfile units to src/ 2021-08-06 08:04:37 -04:00
tpm_debug.h tpm: #undef printf in case it is #define'd (OSS-Fuzz) 2022-04-08 08:35:19 -04:00
tpm_library_conf.h tpmlib: Introduce TPMPROP_TPM2_BUFFER_MAX and set it to 4096 for now 2026-05-06 22:10:01 -04:00
tpm_library_intern.h tpm2: Wrap asprintf to avoid static analyzer warnings 2024-10-03 14:35:16 -04:00
tpm_library.c Fix a compilation error in TPMLIB_GetPlaintext 2026-01-02 12:00:41 -05:00
tpm_memory.c Move common debug, memory & nvfile units to src/ 2021-08-06 08:04:37 -04:00
tpm_nvfile.c nvfile: Free allocated memory on failure 2022-05-20 09:57:09 -04:00
tpm_nvfile.h Move common debug, memory & nvfile units to src/ 2021-08-06 08:04:37 -04:00
tpm_tpm2_interface.c tpmlib: Introduce TPMPROP_TPM2_BUFFER_MAX and set it to 4096 for now 2026-05-06 22:10:01 -04:00
tpm_tpm2_tis.c Sync: Remove some unused files 2026-02-13 09:59:26 -05:00
tpm_tpm12_interface.c tpm2: Remove unused function parameters or mark them as unused 2024-09-24 09:32:02 -04:00
tpm_tpm12_tis.c Move common debug, memory & nvfile units to src/ 2021-08-06 08:04:37 -04:00