aboutsummaryrefslogtreecommitdiff
path: root/libgloss/mips/hal/mips_lock_cache.c
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2025-07-03 12:57:10 +0200
committerCorinna Vinschen <corinna@vinschen.de>2025-07-03 12:59:06 +0200
commitf075f3ba2720b4cca65e63b67c865959ba6b6c92 (patch)
treeb82a2db89f87321ca55a2344aff4d7dab982ee0d /libgloss/mips/hal/mips_lock_cache.c
parentcb33699b031f5b716b4b9522b88275ebf41210d0 (diff)
downloadnewlib-f075f3ba2720b4cca65e63b67c865959ba6b6c92.zip
newlib-f075f3ba2720b4cca65e63b67c865959ba6b6c92.tar.gz
newlib-f075f3ba2720b4cca65e63b67c865959ba6b6c92.tar.bz2
Cygwin: format_process_maps: avoid crashing PID when fetching heap info
To fetch heap info for a process in our /proc/PID/maps emulation, we call RtlQueryProcessDebugInformation on this process since commit b4966f91396b ("(heap_info::heap_info): Rearrange using RtlQueryProcessDebugInformation"). However, it turns out that this call can crash the targeted process, if it's called from multiple threads or processes in parallel. Worse, the entire code from creating the debug buffer, over fetching the debug info, subsequent collecting the information from said debug buffer, up to destroying the buffer, needs to be guarded against parallel access. We do this by adding a global mutex object, serializing access to the debug info of a process. Reported-by: Christian Franke <Christian.Franke@t-online.de> Fixes: b4966f91396b ("(heap_info::heap_info): Rearrange using RtlQueryProcessDebugInformation") Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'libgloss/mips/hal/mips_lock_cache.c')
0 files changed, 0 insertions, 0 deletions