Skip to content

DO NOT MERGE YET: pmfind / libpcp_web: fix crashes, hang, and Valgrind UAF in discovery#2559

Open
kurik wants to merge 2 commits intoperformancecopilot:mainfrom
kurik:pmfind2
Open

DO NOT MERGE YET: pmfind / libpcp_web: fix crashes, hang, and Valgrind UAF in discovery#2559
kurik wants to merge 2 commits intoperformancecopilot:mainfrom
kurik:pmfind2

Conversation

@kurik
Copy link
Copy Markdown
Contributor

@kurik kurik commented Apr 9, 2026

pmfind (source.c): dictDelete before source_release on remove path; remove pmfind contexts dict entry before bulk release; uv_stop after discovery; call pmWebGroupClose before uv_loop_close, uv_close bootstrap timer, and drain uv_run.

webgroup.c: parse context id before on_done and deref via dict lookup so on_done/pmWebGroupDestroy cannot leave a stale cp; defer free(webgroups) until uv_close callbacks complete for embedded timer and async.

kurik added 2 commits April 9, 2026 20:55
pmfind (source.c): dictDelete before source_release on remove path; remove
pmfind contexts dict entry before bulk release; uv_stop after discovery;
call pmWebGroupClose before uv_loop_close, uv_close bootstrap timer, and
drain uv_run.

webgroup.c: parse context id before on_done and deref via dict lookup so
on_done/pmWebGroupDestroy cannot leave a stale cp; defer free(webgroups)
until uv_close callbacks complete for embedded timer and async.
Use the timer handle's loop field so we link on distros shipping
libuv < 1.19.
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