On Sat, 5 Apr 2025, Jon Turney wrote: > On 05/04/2025 06:28, Jeremy Drake via Cygwin wrote: > > I just happened to look at dlfcn.cc dladdr function, and I had a question. > > Should dladdr be using the GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT > > flag? It doesn't seem like dladdr should be incrementing the refcount. > > Indeed. Well spotted. > > This looks like my mistake back in commit > c8432a01c8401c121940c806a9d868c4adc4cefd > > Assuming that flag is available on all applicable Windows versions, it > certainly looks like we should be using it (otherwise, I guess we just > immediately free the handle).
This function (and flag) go back to XP. (I remember this because I was irked about not being able to use it, the company I worked for was supporting old windows versions well past their sell-by date). I'll send a patch. -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple