Skip to content
Commit 9ce06411 authored by Stefan Gränitz's avatar Stefan Gränitz
Browse files

[Kaleidoscope] Fix race condition in order-of-destruction between...

[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 47f5c54f 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
parent 5f1ba3a5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment