Fix a reference count bug in libsync arc#13211
Merged
Conversation
Member
|
Can you add a test about making sure the destructor has run? Additionally, could you put the Thanks for finding this! |
Author
|
I added a test to see if child data of the Arc has been freed. I'm not sure there is a way to insure that the Weak references are freeing their pointer outside of a tool like valgrind. |
Member
|
Can you squash the two commits together? Logically they're part of the same unit. |
Author
|
Sure, done. |
bors
added a commit
that referenced
this pull request
Mar 30, 2014
This is a fix for #13210. fetch_sub returns the old value of the atomic variable, not the new one.
Jarcho
pushed a commit
to Jarcho/rust
that referenced
this pull request
Aug 24, 2024
…ct_constructor_on_adt, r=Alexendoo Respect allow `inconsistent_struct_constructor` on the struct definition Closes rust-lang#13203 Now we check if the target type is marked with `#[allow(clippy:inconsistent_struct_constructor)]` before lining. As a side-effect of this change, The rule in the subject no longer runs on non-local `AdtDef`s. However, as suggested by `@Jarcho` it shouldn't be a big deal since most of the time we didn't have access to this information anyway. > You can't get lint attributes from other crates. I would probably just restrict the lint to only work with types from the current crate while you're at it. Upstream crates don't have a definition order from the point of view of the current crate (with the exception of #[repr(C)] structs). changelog: Respect allow `inconsistent_struct_constructor` on the struct definition.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a fix for #13210. fetch_sub returns the old value of the atomic variable, not the new one.