swift
743599b7 - MoveOnlyChecker: avoid dangling reference in custom alloc

Commit
20 days ago
MoveOnlyChecker: avoid dangling reference in custom alloc The AvailableValueStore maintains stable spans of SILValues, one span (effectively a MutableArrayRef) per basic block, that is preallocated for performance. This patch fixes an issue where _a pointer_ to a span is vended from `AvailableValueStore::get` and that pointer is into storage within a DenseMap, which can reallocate and invalidate all such pointers. There's no reason to be returning a pointer to a MutableArrayRef, aka AvailableValues, so I've simply stripped off that indirection to fix this issue. resolves rdar://162440304 (cherry picked from commit d1f3f8495e5f754fd4694b4afddd510c549cdf85)
Author
Committer
Parents
Loading