-
Notifications
You must be signed in to change notification settings - Fork 237
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
Change signature of load_library_permanently
#445
Conversation
try_load_library_permanently
load_library_permanently
pub fn load_visible_symbols() { | ||
unsafe { LLVMLoadLibraryPermanently(std::ptr::null()) }; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find it anywhere in docs, but people from StackOverflow (and tests) say that passing nullptr
as filename results in loading all the symbols visible inside program
/// Search through all previously loaded dynamic libraries for `symbol`. | ||
/// | ||
/// Returns an address of the symbol, if found | ||
pub fn search_for_address_of_symbol(symbol: &str) -> Option<usize> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may use this to protect from running non-linked functions in jit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Description
Change signature of
load_library_permanently
to be more self-describingRelated Issue
#443
How This Has Been Tested
cargo t --features llvm16-0
Will it be overkill to load a real dll in test?
Breaking Changes
Signature change breaks existing code
Checklist