Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Kaleidoscope] Fix race condition in order-of-destruction between Sec…
…tionMemoryManager and its MemoryMapper SectionMemoryManager's default memory mapper used to be a global static object. If the SectionMemoryManager itself is a global static object, it might be destroyed after its memory mapper and thus couldn't use it from the destructor. The Kaleidoscope tutorial reproduced this situation with MSVC for a long time. Since 47f5c54 it's triggered with GCC as well. The solution from this patch was proposed in the existing review https://reviews.llvm.org/D107087 before, but it didn't move forward. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D154338
- Loading branch information
1 parent
5f1ba3a
commit 9ce0641
Showing
2 changed files
with
12 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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