You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
conrade-ctc
changed the title
print error message from dlerror on failed load
fix rel path in test with absolute resolved path, add error message on dlerror
Feb 4, 2026
conrade-ctc
changed the title
fix rel path in test with absolute resolved path, add error message on dlerror
enable dispatch load/reload in single binary, add error message with dlerror
Feb 4, 2026
@vgvassilev@aaronj0 In getting at least an error message out of dlerror(), the PR reminding me there is no test for Load/Unload, so I also updated that mechanism to enable multiple load/unload cycle (just to enable the test, but of course this is also valuable in general)
@vgvassilev, @aaronj0, I backed out the previous impl that pulled the statics out... I didn't realize you were relying on the inline capture of the statics... in the case, the smallest change is to abuse the dlGetProcAddress function to allow it to reset the data itself when nullptrs are sent in... it's a bit awkward to use the magic invocation, otherwise the changes would need to be a bit more detailed, and you may have other plans for how this shapes up.
FYI, I put something in for the windows version of the error output (but just the error code), but the msvc builds aren't perfectly happy... looking at those now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Problem: Load/UnloadDispatchAPI can't but be used multiple time in an application.
Solution: Enable Load/UnloadDispatchAPI by moving data out and allowing controlled reset of static data via UnloadDispatchAPI.
Also: add
dlerror()when load fails to get diagnostics on reason for failure (e.g., file not found vs symbols not defined)Fixes # (issue)
Type of change
Please tick all options which are relevant.
Testing
Please describe the test(s) that you added and ran to verify your changes.
Checklist