Fix FIXME: thread-safe initialization of DispatchInitializer#844
Fix FIXME: thread-safe initialization of DispatchInitializer#844vgvassilev merged 1 commit intocompiler-research:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #844 +/- ##
=======================================
Coverage 79.75% 79.75%
=======================================
Files 11 11
Lines 4031 4031
=======================================
Hits 3215 3215
Misses 816 816 🚀 New features to boost your workflow:
|
vgvassilev
left a comment
There was a problem hiding this comment.
Any chance for a test?
Thanks! I've pushed a fix to restore the initialization trigger. It looks like CI didn't run for the latest commit. Could you please rerun it? |
@voyager-jhk The ci doesn't run automatically for those who are contributing for the first time. It needs to be manually run. You will need to rebase as well to fix the Emscripten ci. |
|
This is a one-time initialisation for the CppInterOpDispatchTests binary and not thread-safe for the tests (this is not called by each test). We need a single instance creation in Utils.cpp for the API to be loaded at runtime... Unless this fixes some use of |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
clang-tidy review says "All clean, LGTM! 👍" |
|
@voyager-jhk Can you rebase on main and squash into a single commit? I'd like the Native jobs on the CI to run before taking this in |
Done. |
|
clang-tidy review says "All clean, LGTM! 👍" |
Fix FIXME regarding thread-safe initialization of DispatchInitializer.
This change replaces the global static instance with a function-local
static to guarantee thread-safe initialization according to C++11.
The initializer is now created via GetDispatchInitializer().