mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #22125 from aschwaighofer/workaround_dynamic_replacement_failure
DynamicReplacement: Don't fail when a library is closed and reloaded
This commit is contained in:
@@ -1696,11 +1696,15 @@ void DynamicReplacementDescriptor::enableReplacement() const {
|
||||
replacedFunctionKey->root.get());
|
||||
|
||||
// Make sure this entry is not already enabled.
|
||||
// This does not work until we make sure that when a dynamic library is
|
||||
// unloaded all descriptors are removed.
|
||||
#if 0
|
||||
for (auto *curr = chainRoot; curr != nullptr; curr = curr->next) {
|
||||
if (curr == chainEntry.get()) {
|
||||
swift::swift_abortDynamicReplacementEnabling();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// Unlink the previous entry if we are not chaining.
|
||||
if (!shouldChain() && chainRoot->next) {
|
||||
|
||||
Reference in New Issue
Block a user