-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
"test_rc_cyclic_with_one_ref" fails in Miri #76509
Comments
Thanks for notifying me @RalfJung The tests do differ with the by the last two lines (in assert_eq!(one_ref.inner.strong_count(), 2);
assert_eq!(one_ref.inner.weak_count(), 1); Arc has: assert_eq!(Arc::strong_count(&one_ref), 2);
assert_eq!(Arc::weak_count(&one_ref), 1); I can't see where in the implementations What is the procedure for patching this? should I simply open a PR with the suspected fix and mention this issue? |
The tests are entirely safe code though, so that's not where the bug is. The bug is necessarily somewhere around I'll try to investigate more, but won't get around to that before Friday. |
I did some digging, and my guess would be this method used in the
|
Ah I had missed that you were already working on a fix and now I have developed my own. :/ Yours is probably better though, so let's go with that. In the future, please make a note in the issue when you have a PR, so that others know -- there are no notifications for pingbacks. |
Ah sorry about that, still new to contributing here, just left a comment :( In the future, would pinging be acceptable? |
Sure you could also ping me on the PR, though if you just write a brief note here in the issue everyone subscribed will see it. :) And it's not a big deal, don't worry. I probably also should have re-read the issue before trying to fix the problem myself. |
In the latest test suite run in Miri,
test_rc_cyclic_with_one_ref
failed. This test was added in f03d0b3 as part of #75994. The cyclicArc
tests work fine, so either the tests are different or something about theRc
implementation is.The error is "error: Undefined Behavior: not granting access to tag because incompatible item is protected: [Unique for <74172040> (call 24024731)]", which means that some memory is deallocated while a mutable reference to it exists that is kept alive because it was passed as an argument to some function that is still running.
Cc @mental32
The text was updated successfully, but these errors were encountered: