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

Adding a RAII class to promote an object containt a symbol to be dlopened with RTLD_GLOBAL #1000

Merged
merged 4 commits into from
Dec 5, 2023

Conversation

Iximiel
Copy link
Member

@Iximiel Iximiel commented Dec 5, 2023

Description

As we were discussing, I modified @GiovanniBussi's class to fit into plumed, with warnings.

I also reverted the changes from #985, since DLLoader::EnsureGlobalDLOpen makes using RTLD_GLOBAL more granular.

For example, on linux, an embedded python interpreter needs its .so to be loaded with RTLD_GLOBAL, for importing compiled modules, with this you can make only libPython*.so GLOBAL, and not the other part of the code that rely on it.

I am using DLLoader as a namespace for EnsureGlobalDLOpen.

Target release

I would like my code to appear in release 2.10

Type of contribution
  • changes to code or doc authored by PLUMED developers, or additions of code in the core or within the default modules
  • changes to a module not authored by you
  • new module contribution or edit of a module authored by you
Copyright
  • I agree to transfer the copyright of the code I have written to the PLUMED developers or to the author of the code I am modifying.
  • the module I added or modified contains a COPYRIGHT file with the correct license information. Code should be released under an open source license. I also used the command cd src && ./header.sh mymodulename in order to make sure the headers of the module are correct.
Tests
  • I added a new regtest or modified an existing regtest to validate my changes.
  • I verified that all regtests are passed successfully on GitHub Actions.

@codecov-commenter
Copy link

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (91d56cb) 84.10% compared to head (b81cac6) 84.06%.

❗ Current head b81cac6 differs from pull request most recent head 7d301b4. Consider uploading reports for the commit 7d301b4 to get more accurate results

Files Patch % Lines
src/tools/DLLoader.cpp 20.00% 8 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@                 Coverage Diff                 @@
##           autoconf-dladdr    #1000      +/-   ##
===================================================
- Coverage            84.10%   84.06%   -0.04%     
===================================================
  Files                  602      602              
  Lines                56231    56233       +2     
===================================================
- Hits                 47292    47272      -20     
- Misses                8939     8961      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GiovanniBussi GiovanniBussi merged commit 5cbb885 into plumed:autoconf-dladdr Dec 5, 2023
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants