Skip to content

[Contrib] Add GdbServer endpoint verification harness#5

Open
r-log wants to merge 1 commit into
Krilliac:masterfrom
r-log:contrib/gdb-verify-harness
Open

[Contrib] Add GdbServer endpoint verification harness#5
r-log wants to merge 1 commit into
Krilliac:masterfrom
r-log:contrib/gdb-verify-harness

Conversation

@r-log

@r-log r-log commented Jul 4, 2026

Copy link
Copy Markdown

Companion to mangoszero#406 — the verification harness I used to test the GDB endpoint, so it's reproducible.

contrib/gdbServerVerify/gdb_verify.py drives a live mangosd over the endpoint (RSP + monitor ports) and checks game-level breakpoint behaviour across thread boundaries:

  • TEST 1 — an off-thread breakpoint (netaccept, fires on an ACE network thread) must NOT pause the world (tick keeps advancing, hit still counted).
  • TEST 2 — an on-thread breakpoint (worldtick) must enter the cooperative stop and resume on $c + detach.
  • --crash-repro — parks the world thread on a worldtick stop, then has monitor clients submit a line and disconnect immediately so a queued request outlives its socket; a correct server survives, a use-after-free crashes it (the issue fixed in [Debug] Fix monitor-bridge use-after-free in GdbServer #4).

Standard library only, host/ports/crash-dir configurable, run against a test server with GdbServer.Enable = 1. This is the harness that produced the runtime PASS results and the UAF repro noted on mangoszero#406. Independent branch off your current head; no code changes, just the tool under contrib/.

Python harness that drives a live mangosd through the GdbServer debug
endpoint (doc/GdbServer.md) to check game-level breakpoint behaviour
across thread boundaries: an off-thread breakpoint (netaccept) must not
pause the world, an on-thread breakpoint (worldtick) must enter and leave
the cooperative stop, and --crash-repro probes the monitor bridge for a
socket-lifetime use-after-free. Standard library only; host/ports
configurable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant