Move DynamicLibraryManager from function-local static to per-interpreter member.#900
Open
vgvassilev wants to merge 1 commit intocompiler-research:mainfrom
Open
Move DynamicLibraryManager from function-local static to per-interpreter member.#900vgvassilev wants to merge 1 commit intocompiler-research:mainfrom
vgvassilev wants to merge 1 commit intocompiler-research:mainfrom
Conversation
| auto* I1 = TestFixture::CreateInterpreter(); | ||
| ASSERT_NE(I1, nullptr); | ||
| Cpp::ActivateInterpreter(I1); | ||
| Cpp::AddSearchPath(BinDir.str().c_str()); |
Contributor
There was a problem hiding this comment.
warning: too few arguments to function call, expected 3, have 1 [clang-diagnostic-error]
Cpp::AddSearchPath(BinDir.str().c_str());
^28aabdd to
fb7ec74
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #900 +/- ##
==========================================
+ Coverage 81.73% 81.82% +0.08%
==========================================
Files 15 15
Lines 4759 4758 -1
==========================================
+ Hits 3890 3893 +3
+ Misses 869 865 -4
... and 1 file with indirect coverage changes
🚀 New features to boost your workflow:
|
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
…ter member. The DLM was a function-local static shared across all interpreter instances, causing search paths added in one interpreter to leak into all others. Move it to a mutable unique_ptr member of CppInternal::Interpreter so each instance owns its DLM and search path state is properly isolated. Add a test that creates two interpreters, adds a search path to the first, and verifies the second cannot find a library through that path.
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The DLM was a function-local static shared across all interpreter instances, causing search paths added in one interpreter to leak into all others. Move it to a mutable unique_ptr member of CppInternal::Interpreter so each instance owns its DLM and search path state is properly isolated.
Add a test that creates two interpreters, adds a search path to the first, and verifies the second cannot find a library through that path.