-
-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Figure out and document how registration works when plugins are loaded dynamically by dlopen #1
Comments
We may need to set up a |
Note: I believe that I'd have to change over to using |
Thanks for the warning! I filed mmastrac/rust-ctor#3 to follow up. |
While trying to fully understand how this works, I also discovered this comment that details conditions under which OSX libraries won't be unloaded. In this case, the It turns out that dragging in |
Also note that the lifetime of any symbols stored in the loaded plugin is tied to the library being loaded. So any function pointers stored anywhere while it is loaded become undefined behavior. Maybe if there were some way to attach a library lifetime to any symbol lookups, that would work to avoid unsafe behavior? Marking library unloading as |
I'm a bit confused, based off the title/description of this issue it sounds like registration doesn't work with dlopen, but the README.md says that registration does happen at the time of dlopen. I'm trying to use |
To the best of my knowledge, the registration happens during in the main application bootstrap routine (hence before main), but it does not mean that |
Gotcha, that makes sense. I was trying to figure out how a dynamically loaded dependency could access an existing static, which it can't lol. Thanks for clarifying! |
No description provided.
The text was updated successfully, but these errors were encountered: