Huolala Tech
Huolala Tech
Dec 31, 2025 · Fundamentals

Why Does __dispatch_barrier_waiter_redirect_or_wake Crash on iOS 14‑16? A Deep GCD Investigation

The article analyses a recurring crash in an iOS driver app caused by the __dispatch_barrier_waiter_redirect_or_wake function in libdispatch, explains the EXC_BREAKPOINT/SIGTRAP mechanism, compares libdispatch versions, reveals a premature queue release due to non‑atomic reference‑count handling, and proposes replacing GCD‑based barriers with pthread_rwlock_t to eliminate the bug.

BarrierCrashReferenceCounting
0 likes · 15 min read
Why Does __dispatch_barrier_waiter_redirect_or_wake Crash on iOS 14‑16? A Deep GCD Investigation
ITPUB
ITPUB
Sep 5, 2016 · Backend Development

Why a Barrier‑Based Config Swap Still Crashed: Uncovering a Shallow Copy Bug

A seemingly safe configuration swap using barriers caused a crash because a shallow copy duplicated resource pointers, leading to premature freeing of the active configuration; the article explains the bug, shows the faulty code, and presents a corrected approach.

BarrierBug FixC programming
0 likes · 5 min read
Why a Barrier‑Based Config Swap Still Crashed: Uncovering a Shallow Copy Bug