File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1012,6 +1012,7 @@ __ARCH_STRNCPY_NO_REDIRECT
10121012__ARCH_STRSTR_NO_REDIRECT
10131013__ARM_ARCH_7M__
10141014__ARM_FEATURE_CRYPTO
1015+ __ARM_FEATURE_UNALIGNED
10151016__ASSEMBLER__
10161017__ATOMIC_CONSUME
10171018__ATOMIC_RELAXED
Original file line number Diff line number Diff line change @@ -7536,6 +7536,11 @@ int wolfDTLS_accept_stateless(WOLFSSL* ssl)
75367536 return ret;
75377537}
75387538
7539+ /* WC_NO_INLINE: wolfDTLS_accept_stateless passes the address of a stack-local
7540+ * context here; the restore call before return clears it again. Preventing
7541+ * inlining hides that cross-frame assignment from GCC's -Wdangling-pointer
7542+ * analysis, which otherwise flags a false positive on GCC 14+. */
7543+ WC_NO_INLINE
75397544int wolfDTLS_SetChGoodCb(WOLFSSL* ssl, ClientHelloGoodCb cb, void* user_ctx)
75407545{
75417546 WOLFSSL_ENTER("wolfDTLS_SetChGoodCb");
Original file line number Diff line number Diff line change @@ -1726,6 +1726,19 @@ WOLFSSL_API word32 CheckRunTimeSettings(void);
17261726#endif /* WOLFSSL_AESNI || WOLFSSL_ARMASM || USE_INTEL_SPEEDUP || \
17271727 * WOLFSSL_AFALG_XILINX */
17281728
1729+ /* ARM C-only builds: if the toolchain reports that the target does NOT
1730+ * support unaligned access, force the alignment-safe code paths. This
1731+ * catches Cortex-M (ARMv6-M, and ARMv7-M/v8-M built with
1732+ * -mno-unaligned-access) without penalizing unaligned-capable cores
1733+ * such as Cortex-A and AArch64. __ARM_FEATURE_UNALIGNED is defined by
1734+ * GCC, Clang and armclang per the ARM ACLE when unaligned access is
1735+ * available. */
1736+ #if defined(__arm__) && !defined(__ARM_FEATURE_UNALIGNED)
1737+ #ifndef WOLFSSL_USE_ALIGN
1738+ #define WOLFSSL_USE_ALIGN
1739+ #endif
1740+ #endif
1741+
17291742/* Helpers for memory alignment */
17301743#ifndef XALIGNED
17311744 #if defined(__GNUC__) || defined(__llvm__) || \
You can’t perform that action at this time.
0 commit comments