Skip to content
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

dlopen libres with RTLD_LOCAL #3210

Merged
merged 1 commit into from
Apr 21, 2022
Merged

dlopen libres with RTLD_LOCAL #3210

merged 1 commit into from
Apr 21, 2022

Conversation

pinkwah
Copy link
Contributor

@pinkwah pinkwah commented Apr 5, 2022

Using RTLD_GLOBAL adds all of the symbols within libres into the global symbol table of the running process. This can interfere with other libraries that rely on the same dependencies that we do (eg. pybind11) but use a different version. The symbols conflict and you might get a segmentation fault or worse.

@pinkwah pinkwah force-pushed the pinkwah-patch-1 branch 4 times, most recently from 6d7b284 to 49b85e1 Compare April 11, 2022 14:35
@pinkwah pinkwah self-assigned this Apr 11, 2022
BjarneHerland added a commit to BjarneHerland/ert that referenced this pull request Apr 13, 2022
Fixed some unit-tests and allow loading from main-process as fallback

Using RTLD_GLOBAL adds all of the symbols within libres into the global symbol table of the running process. This can interfere with other libraries that rely on the same dependencies that we do (eg. pybind11) but use a different version. The symbols conflict and you might get a segmentation fault or worse.
BjarneHerland added a commit to BjarneHerland/ert that referenced this pull request Apr 13, 2022
Fixed some unit-tests and allow loading from main-process as fallback

Using RTLD_GLOBAL adds all of the symbols within libres into the global symbol table of the running process. This can interfere with other libraries that rely on the same dependencies that we do (eg. pybind11) but use a different version. The symbols conflict and you might get a segmentation fault or worse.
@pinkwah pinkwah force-pushed the pinkwah-patch-1 branch 3 times, most recently from 8835fd4 to 4faa6e9 Compare April 21, 2022 09:15
Using RTLD_GLOBAL adds all of the symbols within libres into the global symbol table of the running process. This can interfere with other libraries that rely on the same dependencies that we do (eg. pybind11) but use a different version. The symbols conflict and you might get a segmentation fault or worse.
@pinkwah
Copy link
Contributor Author

pinkwah commented Apr 21, 2022

jenkins test this please

1 similar comment
@pinkwah
Copy link
Contributor Author

pinkwah commented Apr 21, 2022

jenkins test this please

workflow_job->module, dlerror());

if (!workflow_job->lib_handle) {
fprintf(stderr, "Failed to load symbol:%s Error:%s \n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps "Failed to load module" since that is what failed?

Copy link
Contributor

@BjarneHerland BjarneHerland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit, but nice! 👍

Would appreciate if you wait with the merge for @berland to double-check for the original problem like he did for #3259...

@pinkwah pinkwah merged commit 54f4d52 into main Apr 21, 2022
@pinkwah pinkwah deleted the pinkwah-patch-1 branch April 21, 2022 14:39
@sondreso sondreso added the release-notes:improvement Automatically categorise as improvement in release notes label Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:improvement Automatically categorise as improvement in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants