Files
wolfssl/.github/workflows
Andrew Hutchings 7b89d82b35 Fix mem_track.h compile failure on multi-threaded non-Linux builds
The memLock mutex and #include <pthread.h> in mem_track.h were
declared under #ifdef DO_MEM_LIST (Linux/macOS/Zephyr only), but
referenced under the broader guard

    !defined(SINGLE_THREADED) && \
    (defined(DO_MEM_LIST) || defined(DO_MEM_STATS))

Since DO_MEM_STATS is defined whenever WOLFSSL_TRACK_MEMORY +
USE_WOLFSSL_MEMORY are set without WOLFSSL_STATIC_MEMORY, any
non-Linux/Mac/Zephyr multi-threaded build failed to compile with
implicit pthread_mutex_lock declarations and undeclared memLock.

Replace the raw pthread mutex with wolfSSL's portable mutex API
(wc_InitMutex / wc_LockMutex / wc_UnLockMutex / wc_FreeMutex) so
locking works on every platform wolfSSL already ports to.
InitMemoryTracker now calls wc_InitMutex before
wolfSSL_SetAllocators installs TrackMalloc, guarded by a
memLockInit flag for idempotency. CleanupMemoryTracker calls
wc_FreeMutex after restoring the default allocators so no
in-flight allocation races a freed mutex. The four mutex guards
in TrackMalloc/TrackFree and the two in InitMemoryTracker/
ShowMemoryTracker are unified on the same condition as the
memLock declaration itself.

ZD #21763
2026-05-11 16:20:35 +01:00
..
2026-04-24 17:07:37 +02:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-04-25 11:47:24 -05:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-03-24 15:24:01 +00:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-03-24 15:24:01 +00:00
2024-12-09 13:38:07 +01:00
2026-04-10 12:50:24 +02:00
2026-03-24 15:24:01 +00:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-04-25 11:47:24 -05:00
2026-04-25 11:47:24 -05:00
2026-04-10 12:50:24 +02:00
2026-02-25 15:46:20 +01:00
2026-04-25 11:47:24 -05:00
2026-04-25 11:47:24 -05:00
2024-12-09 12:42:32 +01:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-04-24 16:55:51 -06:00
2026-04-10 12:50:24 +02:00
2026-04-29 07:41:57 +01:00
2026-04-22 11:39:39 -07:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-05-07 15:25:19 +02:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2026-05-01 07:12:55 +01:00
2026-04-10 12:50:24 +02:00
2026-04-10 12:50:24 +02:00
2025-12-09 07:00:50 -07:00
2026-03-24 15:24:01 +00:00