You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Memory leak at debugger-agent.c (dotnet version - 11.0.100-rc.1.26420.103) #133354
In /src/runtime/src/mono/mono/component/debugger-agent.c the variable event_requests is initialized twice. The first initialization is performed at line 792 via a call to g_ptr_array_new, and the second one is performed at line 808 inside the function mono_init_debugger_agent_common (line 1623). As a result, the memory allocated after the first initialization is lost, because the pointer to it is overwritten by the second assignment.
A similar issue exists with the variable pending_assembly_loads — it is first initialized at line 808 inside the function mono_init_debugger_agent_common (line 1625), and then re-initialized at line 810 via a call to g_ptr_array_new, which again leaks the previously allocated memory.
Possible solution
It is suggested to add checks in the relevant places (at lines 1623 and 810) to ensure that the variable has not been initialized yet before performing the assignment. It is also acceptable to add such checks in every place where the variables are initialized (lines 792, 810, 1623, and 1625).
Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Thanks for reporting. Since these are one-time leaks, probably been around for a longer time, I will put it under Future milestone. Please feel free to submit a PR with proposed change.
Activity
akoeplinger commentedon Sep 7, 2026
Moving to dotnet/runtime
dotnet-policy-service commentedon Sep 7, 2026
Tagging subscribers to this area: @steveisok, @thaystg, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.
lateralusX commentedon Sep 10, 2026
Thanks for reporting. Since these are one-time leaks, probably been around for a longer time, I will put it under Future milestone. Please feel free to submit a PR with proposed change.
samitistfobos-dev commentedon Sep 10, 2026
Created pull request - 133594