You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[addr-move-function] Fix memory safety issue found by ASAN.
The specific issue was I needed to add an '&' here:
```
- for (auto closureUse : useState.closureUses) {
+ for (auto &closureUse : useState.closureUses) {
```
without this, we eventually grab a pointer into the temporary closureUse instead
of the reference to the actual value in the data structure which we are trying
to actually pass a pointer off to.
I also added some small improvements to the debug printing in the pass that I
think helps understand how the code works here.
rdar://87618517
0 commit comments