-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[ORC][LibraryResolver] Fix ensureFilterBuilt assertion failure and concurrency issue. #166510
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
Conversation
…chitecture compatibility check
| std::vector<std::shared_ptr<LibraryInfo>> getLibraries(LibState S, | ||
| PathType K) const { |
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.
| std::vector<std::shared_ptr<LibraryInfo>> getLibraries(LibState S, | |
| PathType K) const { | |
| void getLibraries(LibState S, PathType K, std::vector<std::shared_ptr<LibraryInfo>>& Outs) const { |
Why this became a shared_ptr? Are we going to lose performance?
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 was already StringMap<std::shared_ptr<LibraryInfo>> Libraries; in LibraryManager.
Would using raw pointers or references be safe in a concurrent environment?
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.
Let’s keep the stared_ptr like this and measure the performance on the downstream client.
vgvassilev
left a comment
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.
LGTM! Should we land this together with enabling the tests from #166147
… (#166147) 1. Fixed test setup to correctly create .so/.dylib files in the build directory. Previously, the build was happening in the source directory using the same input parent path. 2. Fixed architecture compatibility check in #166510 . Co-authored-by: Vassil Vassilev <[email protected]>
…vm#165360) (llvm#166147) 1. Fixed test setup to correctly create .so/.dylib files in the build directory. Previously, the build was happening in the source directory using the same input parent path. 2. Fixed architecture compatibility check in llvm#166510 . Co-authored-by: Vassil Vassilev <[email protected]>
Fixed architecture compatibility check.
Previously, we used
sys::getDefaultTriple(), which caused issues on build botsusing cross-compilation. We now ensure that the target architecture where the
shared library (.so) is run or loaded matches the architecture it was built for.
Fixed ensureFilterBuilt assertion failure.
Replaced use of FilteredView with a safer alternative for concurrent environments.
The old FilteredView approach iterated over shared state without sufficient
synchronization, which could lead to invalid accesses when libraries were being
added or removed concurrently.