Skip to content

Fuzzing infrastructure for ext/async #102

Closed

Description

@EdmondDantes

Problem

Concurrency bugs in ext/async (races, deadlocks, lost wakeups, refcount
corruption) are non-deterministic and not reachable by unit tests or
byte-level fuzzing. Existing TODOs already point to such bugs:
thread_channel/019,024 race, gc_addref assert at shutdown under ASAN.

Proposed approach (incremental)

  1. Property-based testing (PHP level) — random sequences of
    spawn/send/recv/cancel/close/await, check invariants (refcount==0 after
    scope, recv completes after close, etc). Cheap, CI-friendly.
  2. Structure-aware libFuzzer target — sapi/fuzzer/fuzzer-async.c with
    protobuf grammar for async ops, mutated by libprotobuf-mutator, run under
    ASAN+UBSAN. Catches UAF / double-free / refcount errors in C.
  3. Schedule fuzzing — scheduler decision points read "next coroutine"
    from fuzzer input → deterministic interleavings. References: Loom,
    Shuttle, CHESS, syzkaller.
  4. TSAN CI build — --enable-thread-sanitizer running existing tests.

Out of scope

Byte-level fuzzing of PHP source (already covered by fuzzer-parser /
fuzzer-execute).

Activity

  1. self-assigned this
    on May 9, 2026
  2. added
    enhancement
    on May 9, 2026
  3. added theissue type on May 9, 2026
  4. moved this to In Progress in True Async Boardon May 9, 2026
  5. added this to the TrueAsync 0.7.0 milestone on May 9, 2026
  6. added 9 commits that reference this issue on May 9, 2026
  7. 13 remaining items

  8. added 10 commits that reference this issue on May 10, 2026
  9. added a commit that references this issue on May 10, 2026
  10. added a commit that references this issue on May 10, 2026
  11. moved this from In Progress to Done in True Async Boardon May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions