-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update the sdk bootstrap code to fail fast on clear problems with the lib from alfasim #390
base: master
Are you sure you want to change the base?
Update the sdk bootstrap code to fail fast on clear problems with the lib from alfasim #390
Conversation
#define LOAD_SDK_PROC_MAP_TYPE(func_name, func_type) {\ | ||
dlerror();\ | ||
api->func_name = (func_type)dlsym(api->handle, #func_name);\ | ||
char *last_error = dlerror(); | ||
if (last_error != NULL) {\ | ||
dlclose(api->handle);\ | ||
api->handle = nullptr;\ | ||
return SDK_FAILED_TO_LOAD_FUNCTION;\ | ||
}\ | ||
} | ||
#define LOAD_SDK_PROC(func_name) LOAD_SDK_PROC_MAP_TYPE(func_name, func_name ## _func) |
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.
It is many years since I wrote any macro.
Is this (and the ones in the other bootstrap file) OK?
… lib from alfasim The problems covered in this update: - Can not load the lib (not found or corrupted); - Can not fetch the address of a function from the lib; ASIM-5532
389605a
to
dbf8d65
Compare
Quality Gate passedIssues Measures |
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.
Nice!!
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.
Nice work!
The problems covered in this update:
ASIM-5532