Commit 284048f
committed
Cygwin: dlsym: fetch module list via EnumProcessModules
We're using RtlQueryProcessDebugInformation from dlsym since
commit 31ddf45 ("* autoload.cc (EnumProcessModules): Remove.")
Observations on the Cygwin mailing list show that calling
RtlQueryProcessDebugInformation on a process is neither
thread-safe, nor multi-process-safe, see
https://cygwin.com/pipermail/cygwin/2025-July/258403.html
for details.
This patch essentially reverts 31ddf45. Fetch the list of
loaded modules in the current process by calling EnumProcessModules
again.
Reported-by: Christian Franke <[email protected]>
Fixes: 31ddf45 ("* autoload.cc (EnumProcessModules): Remove.")
Signed-off-by: Corinna Vinschen <[email protected]>
(cherry picked from commit 8ac2bc46b186ba3234e5f50931805308ead4af8d)1 parent 47c7455 commit 284048f
2 files changed
+13
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
525 | 525 | | |
526 | 526 | | |
527 | 527 | | |
| 528 | + | |
| 529 | + | |
528 | 530 | | |
529 | 531 | | |
530 | 532 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
318 | 319 | | |
319 | 320 | | |
320 | 321 | | |
321 | | - | |
322 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
323 | 325 | | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
335 | 330 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
347 | 334 | | |
348 | 335 | | |
349 | 336 | | |
| |||
0 commit comments