[Contrib] Add GdbServer endpoint verification harness#5
Open
r-log wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to mangoszero#406 — the verification harness I used to test the GDB endpoint, so it's reproducible.
contrib/gdbServerVerify/gdb_verify.pydrives a livemangosdover the endpoint (RSP + monitor ports) and checks game-level breakpoint behaviour across thread boundaries:netaccept, fires on an ACE network thread) must NOT pause the world (tick keeps advancing, hit still counted).worldtick) must enter the cooperative stop and resume on$c+ detach.--crash-repro— parks the world thread on aworldtickstop, 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 undercontrib/.