Skip to content

Conversation

@gottesmm
Copy link
Contributor

Otherwise in async contexts we may propagate forward an original non-invalidated
debug_value created a use of the invalidated memory. This then causes the
MemoryLifetimeVerifier to trigger.

I also discovered via this test case that we were not ignoring end_access as a
liveness use when visiting non-closure uses. With this change we ignore it
now. That being said, the reason why the end_access has not been an issue
previously is that due to the hacky way that the move builtin lowers, we
actually create the move outside of the relevant access scope (which even worse
is a read!). I am going to fix that in a different PR though.

… debug_value undef before the destroy_addr.

Otherwise in async contexts we may propagate forward an original non-invalidated
debug_value created a use of the invalidated memory. This then causes the
MemoryLifetimeVerifier to trigger.

I also discovered via this test case that we were not ignoring end_access as a
liveness use when visiting non-closure uses. With this change we ignore it
now. That being said, the reason why the end_access has not been an issue
previously is that due to the hacky way that the move builtin lowers, we
actually create the move outside of the relevant access scope (which even worse
is a read!). I am going to fix that in a different PR though.
@gottesmm
Copy link
Contributor Author

@swift-ci test

@gottesmm
Copy link
Contributor Author

I discovered this issue btw while writing tests for the async debug info generation. I just peeled this fix off from that PR into this one so it can be validated separately.

@gottesmm
Copy link
Contributor Author

gottesmm commented May 2, 2022

@swift-ci test

@gottesmm
Copy link
Contributor Author

gottesmm commented May 2, 2022

Test passed. The windows test failed in a flaky concurrency test.

@gottesmm gottesmm merged commit 91a23de into swiftlang:main May 2, 2022
@gottesmm gottesmm deleted the pr-fa9ad2bd442ef675706f04dfe85e40f894aacd00 branch May 2, 2022 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant