Fix conversions of Box<T, A> to Rc<T, A> or Arc<T, A> to use allocator correctly for dropping the Box#119812
Fix conversions of Box<T, A> to Rc<T, A> or Arc<T, A> to use allocator correctly for dropping the Box#119812steffahn wants to merge 1 commit intorust-lang:masterfrom
Box<T, A> to Rc<T, A> or Arc<T, A> to use allocator correctly for dropping the Box#119812Conversation
to use allocator correctly for dropping the `Box`.
|
r? @cuviper (rustbot has picked a reviewer for you, use r? to override) |
|
Looks like the issue was independently discovered there too, perhaps, otherwise #119749 would have been linked? I didn't know that miri does differentiate |
|
CI doesn't run lib tests under miri, that happens somewhere else as a daily job because it's slow. You can do that manually via https://github.com/rust-lang/miri-test-libstd |
|
I meant CI more generally anyways - so I guess a normal library test would be sufficient to make sure a bug being reintroduced wouldn't stay unnoticed. Thanks for the info, good to know. |
|
Anyways… I guess I’ll close this to remove the duplicate :-) |
|
Ah sorry, I didn't see there was already an issue for it. I discovered the problem while working on #119761 but wanted to fix it in a separate PR since it was a soundness fix which shouldn't need as much approval as that PR. |
|
No worries. We had literally seeing the same issue independently around roughly the same time. Great coincidence. I’ve spotted your PR #119761 already after #119801 was mentioned, and figured that’s where you’re coming from. While you were creating #119761, the issue #119749 probably didn't even exist yet. I was coming from explaining ppl how |
This fixes #119749.
I wanted to add a test, too, but realized there are essentially no tests for almost any of the code handling custom allocators, anyways1, and I didn’t want to introduce a whole generally usable testing
Allocatorimplementation just for this soundness fix.Footnotes
as far as I could tell. Feel free to point me to anything I might have missed. ↩