-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Distributed] Ensure to swift_release during destroying decoded distributed call arguments #65952
[Distributed] Ensure to swift_release during destroying decoded distributed call arguments #65952
Conversation
@swift-ci please smoke test |
Why? |
b58b86e
to
842771c
Compare
@DougGregor asked for it, I guess so it's the same as other things in this func, also in reverse? "Shouldn't matter but" I guess |
The other thing is stack allocations which should be in reverse order, this one is just calls to destroy function that’s why I am asking the question here :) |
@swift-ci please smoke test |
Yeah it really shouldn't matter for this one... I'll ask @DougGregor if he thinks we'd better do it like this anyway or nah. |
note to self; add some more tests to check various combinations of types |
842771c
to
73cd2c9
Compare
I was adding more tests and actually see that deinits DON'T run and we have an unbalanced retain here still -- even if the memory is properly destroyed so we don't leak the object itself. We're in the Direct_Guaranteed case and take the param with |
73cd2c9
to
6649804
Compare
6649804
to
abdfb15
Compare
@swift-ci please smoke test |
abdfb15
to
cd3e243
Compare
@swift-ci please smoke test |
Fixed formatting |
@swift-ci please smoke test and merge |
We recently fixed a similar issue where the objects created from decodeNextArgument in a distributed thunk were not properly destroyed. The fix was in swiftlang#65952 In that fix, we missed handling of Indirect_In_Guaranteed which also need to be destroyed, this patch corrects that omission. Resolves swiftlang#70004 Resolves rdar://119943672 Resolves rdar://119446012
We recently fixed a similar issue where the objects created from decodeNextArgument in a distributed thunk were not properly destroyed. The fix was in swiftlang#65952 In that fix, we missed handling of Indirect_In_Guaranteed which also need to be destroyed, this patch corrects that omission. Resolves swiftlang#70004 Resolves rdar://119943672 Resolves rdar://119446012
We recently fixed a similar issue where the objects created from decodeNextArgument in a distributed thunk were not properly destroyed. The fix was in swiftlang#65952 In that fix, we missed handling of Indirect_In_Guaranteed which also need to be destroyed, this patch corrects that omission. Resolves swiftlang#70004 Resolves rdar://119943672 Resolves rdar://119446012
We recently fixed a similar issue where the objects created from decodeNextArgument in a distributed thunk were not properly destroyed. The fix was in swiftlang#65952 In that fix, we missed handling of Indirect_In_Guaranteed which also need to be destroyed, this patch corrects that omission. Resolves swiftlang#70004 Resolves rdar://119943672 Resolves rdar://119446012
We recently fixed a similar issue where the objects created from decodeNextArgument in a distributed thunk were not properly destroyed. The fix was in swiftlang#65952 In that fix, we missed handling of Indirect_In_Guaranteed which also need to be destroyed, this patch corrects that omission. Resolves swiftlang#70004 Resolves rdar://119943672 Resolves rdar://119446012
Follow up to #65874
Resolves: #65853 now also ensuring deinits properly run.
Thanks for review @DougGregor
Huge thanks to @xedin for helping debug the issue.
We must destroy before we deallocate, otherwise the destroy does nothing to refcount and we would not run deinitializers as expected.