Merge pull request #5435 from douzzer/20220803-gcc-12-ASAN

20220803-gcc-12-ASAN
This commit is contained in:
David Garske
2022-08-04 08:41:26 -07:00
committed by GitHub
2 changed files with 14 additions and 2 deletions

View File

@@ -22928,6 +22928,15 @@ const char* GetCipherSegment(const WOLFSSL_CIPHER* cipher, char n[][MAX_SEGMENT_
return name;
}
/* gcc-12 and later, building with ASAN at -O2 and higher, generate spurious
* stringop-overread warnings on some (but not all...) reads of n[1] in
* GetCipherKeaStr().
*/
#if defined(__GNUC__) && __GNUC__ > 11 && defined(__SANITIZE_ADDRESS__)
PRAGMA_GCC_DIAG_PUSH
PRAGMA_GCC("GCC diagnostic ignored \"-Wstringop-overread\"")
#endif
const char* GetCipherKeaStr(char n[][MAX_SEGMENT_SZ]) {
const char* keaStr = NULL;
@@ -22958,6 +22967,9 @@ const char* GetCipherKeaStr(char n[][MAX_SEGMENT_SZ]) {
return keaStr;
}
#if defined(__GNUC__) && __GNUC__ > 11 && defined(__SANITIZE_ADDRESS__)
PRAGMA_GCC_DIAG_POP
#endif
const char* GetCipherAuthStr(char n[][MAX_SEGMENT_SZ]) {

View File

@@ -77,7 +77,7 @@
byte personal[BLAKE2S_PERSONALBYTES]; /* 32 */
} blake2s_param;
typedef struct ALIGN32 __blake2s_state
typedef struct __blake2s_state
{
word32 h[8];
word32 t[2];
@@ -102,7 +102,7 @@
byte personal[BLAKE2B_PERSONALBYTES]; /* 64 */
} blake2b_param;
typedef struct ALIGN64 __blake2b_state
typedef struct __blake2b_state
{
word64 h[8];
word64 t[2];