-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Summary
Observing the following build warning while compiling with IAR toolchain:
System information
Mbed TLS version (number or commit id): Mbed-TLS v3.6.5
Operating system and version: Windows OS
Compiler and options (if you used a pre-built binary, please indicate how you obtained it): IAR toolchain v9.70.4
Expected behavior
Build passes without any warnings.
Actual behavior
Observing multiple warnings of type Pa217:
Warning[Pa217]: [TPB-3967]: access of bit field member "<>" that is placed in the same, or overlapping, container as the adjacent non-bit-field member "<>" -- non-interference is not guaranteed
Additional information
unsigned int MBEDTLS_PRIVATE(is_encrypt) : 1;
^
"<>\include\psa\crypto_builtin_composites.h",83 Warning[Pa217]: [TPB-3967]: access of bit field member "is_encrypt" that is placed in the same, or overlapping, container as the adjacent non-bit-field member "key_type" -- non-interference is not guaranteed
unsigned int MBEDTLS_PRIVATE(is_encrypt) : 1;
^
"<>\include\psa\crypto_builtin_composites.h",83 Warning[Pa217]: [TPB-3967]: access of bit field member "is_encrypt" that is placed in the same, or overlapping, container as the adjacent non-bit-field member "tag_length" -- non-interference is not guaranteed
unsigned int MBEDTLS_PRIVATE(is_sign) : 1;
^
"<>\include\psa\crypto_struct.h",143 Warning[Pa217]: [TPB-3967]: access of bit field member "is_sign" that is placed in the same, or overlapping, container as the adjacent non-bit-field member "mac_size" -- non-interference is not guaranteed
unsigned int MBEDTLS_PRIVATE(iv_set) : 1;
^
"<>\include\psa\crypto_struct.h",108 Warning[Pa217]: [TPB-3967]: access of bit field member "iv_set" that is placed in the same, or overlapping, container as the adjacent non-bit-field member "default_iv_length" -- non-interference is not guaranteed
unsigned int MBEDTLS_PRIVATE(state) : 2;
^
"<>\include\psa\crypto_builtin_key_derivation.h",38 Warning[Pa217]: [TPB-3967]: access of bit field member "state" that is placed in the same, or overlapping, container as the adjacent non-bit-field member "block_number" -- non-interference is not guaranteed
Note: These warnings are observed due to mixing bit field and non-bit field members in the same structure. When these are packed together, they share the same underlying memory container (word/byte) and accessing one can potentially interfere with the other.