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).


--
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

Reply via email to