[all-commits] [llvm/llvm-project] 9ce064: [Kaleidoscope] Fix race condition in order-of-dest...
Stefan Gränitz via All-commits
all-commits at lists.llvm.org
Wed Jul 5 05:49:20 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9ce06411994e9bcaa98c219c7dc34c2824353a81
https://github.com/llvm/llvm-project/commit/9ce06411994e9bcaa98c219c7dc34c2824353a81
Author: Stefan Gränitz <stefan.graenitz at gmail.com>
Date: 2023-07-05 (Wed, 05 Jul 2023)
Changed paths:
M llvm/include/llvm/ExecutionEngine/SectionMemoryManager.h
M llvm/lib/ExecutionEngine/SectionMemoryManager.cpp
Log Message:
-----------
[Kaleidoscope] Fix race condition in order-of-destruction between SectionMemoryManager 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 47f5c54f997a59bb2c65 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
More information about the All-commits
mailing list