Uh oh!
There was an error while loading. Please reload this page.
debug_assert a few more raw pointer methods - #69208
Conversation
rust-highfive
commented
Feb 16, 2020
r? @cramertj (rust_highfive has picked a reviewer for you, use r? to override) |
Mark-Simulacrum
commented
Feb 16, 2020
I believe we're already doing this elsewhere and these are consistent with that, so @bors r+ rollup |
bors
commented
Feb 16, 2020
📌 Commit bec5d37 has been approved by |
…acrum debug_assert a few more raw pointer methods Fixesrust-lang#53871
…acrum debug_assert a few more raw pointer methods Fixesrust-lang#53871
…acrum debug_assert a few more raw pointer methods Fixesrust-lang#53871
JohnTitor
commented
Feb 17, 2020
This likely caused the failure: #69219 (comment) |
RalfJung
commented
Feb 17, 2020
Hm, PR CI passed and I don't see what the error message would have to do with this PR. So, doesn't seem likely to me... but I have seen stranger things. Why do you think it was this one? |
JohnTitor
commented
Feb 17, 2020
I suspect this and #68767, but it's a tweak for macOS so I've commented here. Hm so likely later one caused the failure (i.e. this PR is unrelated)? |
…acrum debug_assert a few more raw pointer methods Fixesrust-lang#53871
JohnTitor
commented
Feb 17, 2020
Okay, next rollup contains this, if the failure isn't shown, I'll visit later one (sorry for the noise!). |
RalfJung
commented
Feb 17, 2020
No you were right, I can reproduce the failure locally. @bors r- I am at a loss though about what could be causing this... |
Mark-Simulacrum
commented
Feb 17, 2020
Perhaps some function isn't getting inlined as much and we're spilling more to the stack? It would be helpful to get llvm ir before/after this PR, I think. @bors try so we'll have public artifacts |
bors
commented
Feb 17, 2020
⌛ Trying commit bec5d37 with merge 87552e5967d74a9c38c6b3261a821204d68e6761... |
bors
commented
Feb 26, 2020
💔 Test failed - checks-azure |
rust-highfive
commented
Feb 26, 2020
The job Click to expand the log.I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact |
RalfJung
commented
Feb 26, 2020
@eddyb I have enabled debug assertions locally. That was my first suspicion, but that's not it -- or at least, it is not alone sufficient. Maybe "debug assertions + 32bit", or so. Now it happened on wasm32, it seams? I am somewhat out of my depth to debug this, I am afraid. We could just add |
| // give space for 2 copies of `Big` + 128 "misc" bytes. | ||
| if stack_usage > mem::size_of::<Big>() * 2 + 128 { | ||
| // give space for 2 copies of `Big` + 256 "misc" bytes. | ||
| if stack_usage > mem::size_of::<Big>() * 2 + 256 { |
There was a problem hiding this comment.
Hmm why would this change? I would hope your additions don't actually need format_args! but it's possible debug_assert! is inefficient?
Uh oh!
There was an error while loading. Please reload this page.
| #[inline] | ||
| #[stable(feature = "rust1", since = "1.0.0")] | ||
| pub unsafe fn write<T>(dst: *mut T, src: T) { | ||
| debug_assert!(is_aligned_and_not_null(dst), "attempt to write to unaligned or null pointer"); |
There was a problem hiding this comment.
I wonder if this is the problem, maybe try landing swap_nonoverlapping and this separately.
Maybe some uses of ptr::write want to use intrinsics::move_val_init directly without creating a raw pointer? This is so important, IIRC we lower intrinsics::move_val_init in MIR building directly.
RalfJung
commented
Feb 27, 2020
All right, I removed the assertion from Since this is a subset of the previous changes: @bors r=Mark-Simulacrum rollup- |
bors
commented
Feb 27, 2020
📌 Commit 8d3b306 has been approved by |
RalfJung
commented
Feb 27, 2020
@bors p=0 |
bors
commented
Feb 29, 2020
bors
commented
Feb 29, 2020
☀️ Test successful - checks-azure |
debug-assert ptr sanity in ptr::write This is a re-submission of the parts that we removed from rust-lang#69208 due to ["interesting" test failures](rust-lang#69208 (comment)). Fixesrust-lang#53871 r? @Mark-Simulacrum@eddyb
Makes progress for #53871