forked from OSchip/llvm-project
[ORC] Fix MachOPlatform's synthetic symbol dependence registration.
A think-o in the existing code meant that dependencies were never registered. This failure could lead to crashes rather than orderly error propagation if initialization dependencies failed to materialize. No test case: The bug was discovered in an out-of-tree code and requires pathalogically misconfigured JIT to generate the original error that lead to the crash.
This commit is contained in:
parent
057028ed39
commit
7ff335a25f
|
@ -305,7 +305,7 @@ void MachOPlatform::InitScraperPlugin::modifyPassConfig(
|
|||
preserveInitSectionIfPresent(InitSectionSymbols, G, "__objc_selrefs");
|
||||
preserveInitSectionIfPresent(InitSectionSymbols, G, "__objc_classlist");
|
||||
|
||||
if (!InitSymbolDeps.empty()) {
|
||||
if (!InitSectionSymbols.empty()) {
|
||||
std::lock_guard<std::mutex> Lock(InitScraperMutex);
|
||||
InitSymbolDeps[&MR] = std::move(InitSectionSymbols);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue