Repository navigation
Conversation
gmtapi_init_sharedlibs starts the list with 8 entries (calloc) and grows it with realloc, which does not clear the new ones. Their handle was left uninitialized, so gmtapi_free_sharedlibs passed garbage to dlclose at the end of the session: a segfault on Linux, and on Windows FreeLibrary failing with "Failure while closing GMT z shared library" (vcpkg copies 7 dependency DLLs into build/src/plugins, which makes 9 entries; z.dll is the ninth). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
That cannot be true because I never saw any of those warnings in my local build. And even in the CI they start to appear a couple months ago, making me thing in some kind of issue with a dependency. |
|
Claude's explanation of why this shows up in the Windows CI but not in a regular build:
How many DLLs are there in the plugin folder of your local build? If there are few, the bug cannot show up there. About "a couple of months ago": the Windows job of Another option would be to change the Windows workflow so that vcpkg does not copy those DLLs, by passing |
|
The Windows job of this PR has finished: the message "Failure while closing GMT z shared library" no longer appears. As a result, The other Windows failures ( |
Only the dlls that are dynamically loaded. In my case it is |
Ok, so I suspect we should try this:
|
The Windows CI tests print "Failure while closing GMT z shared library" many times, so I asked Claude to look into it. This is its explanation:
Tested with:
This PR also adds
test/gmt_core/sharedlibs_many.sh, which sets up 9 empty libraries and fails without the fix. I ran it on Linux and, without the fix, it fails with a segfault.This should remove that message from the Windows CI and fix
pssolar_missing_plusd, which fails only because of it.Written with Claude Sonnet 5.5, reviewed with Claude Opus 5.5-