Uh oh!
There was an error while loading. Please reload this page.
Future-proof the compiler for Box<T, A>. - #47043
Conversation
Ericson2314
commented
Dec 28, 2017
For the record, Work is https://github.com/QuiltOS/rust/tree/allocator-error and described at #32838 (comment) I'll kick off the rustc before I go to sleep, and test against my branch in the morning Thanks again @eddyb! |
Ericson2314
commented
Dec 28, 2017
@eddyb tested and everything indeed builds! I guess I should make a toy executable next? |
eddyb
commented
Dec 29, 2017
Added one more commit to allow changing |
@eddyb, with or without the functionality you specified (which I put in in #[unstable(feature = "asdfasdf", issue = "12345678")]#[derive(Debug)]pubstructFooAlloc(usize);#[unstable(feature = "asdfasdf", issue = "12345678")]unsafeimpl::allocator::AllocforFooAlloc{typeErr = !;unsafefnalloc(&mutself,layout:::allocator::Layout) -> Result<*mutu8,Self::Err>{::abort_adapter::AbortAdapter(::heap::Heap).alloc(layout)}unsafefndealloc(&mutself,ptr:*mutu8,layout:::allocator::Layout){::abort_adapter::AbortAdapter(::heap::Heap).dealloc(ptr, layout)}}#[unstable(feature = "asdfasdf", issue = "12345678")]pubfnfoo(x:Box<String,FooAlloc>,y:bool){if y {let _x = *x;}}I get, when compiled with the old With the fixed |
eddyb
commented
Jan 2, 2018
@rust-lang/infra There's no way for this to get into beta, is there? |
alexcrichton
commented
Jan 2, 2018
@eddyb this can be backported like most other backports, right? |
Ericson2314
commented
Jan 2, 2018
@alexcrichton I'd think so. it works with the standard library as it exists today. |
eddyb
commented
Jan 2, 2018
To be clear, I mean get into the nightly and then make the cut into the next beta. Backporting it after the cut seems okay-ish, assuming it gets a proper review from @nikomatsakis or someone else. |
Ericson2314
commented
Jan 2, 2018
Hmm yeah the point would be to have it in beta for the sake of bootstrapping nightly, not to eventually get it into beta so that it makes stable but nightly needs to wait for the next beta. |
nikomatsakis
commented
Jan 3, 2018
@bors r+ This is a big PR to backport, though, and not entirely trivial. |
bors
commented
Jan 3, 2018
📌 Commit 99bf699 has been approved by |
bors
commented
Jan 3, 2018
⌛ Testing commit 99bf699 with merge a48c0980b61fdac7ee026c9e34a7d47e1d6fafcd... |
bors
commented
Jan 4, 2018
💔 Test failed - status-appveyor |
The backtrace tests failed on Details |
eddyb
commented
Jan 4, 2018
@alexcrichton IIRC, 32-bit x86 with MSVC uses a different unwinding scheme than GNU. |
alexcrichton
commented
Jan 4, 2018
Hm maybe? It's true that the unwinding scheme of i686 MSVC is totally unique to that target, and I believe the method we acquire backtraces with does indeed require debug info (but unwinding doesn't require deubginfo). I wouldn't know where to start looking unfortunately though. |
bors
commented
Jan 5, 2018
📌 Commit 0ee960f has been approved by |
bors
commented
Jan 5, 2018
⌛ Testing commit 0ee960f06f395b98520953546451ae82c15cb15b with merge 3dabf28fadecd61801897fcbbcdb482a57d810e9... |
bors
commented
Jan 5, 2018
💔 Test failed - status-appveyor |
eddyb
commented
Jan 6, 2018
@bors r=nikomatsakis (now with the LLVM pointer types for |
bors
commented
Jan 6, 2018
📌 Commit 5043534 has been approved by |
bors
commented
Jan 6, 2018
⌛ Testing commit 5043534 with merge 52ccf67a08c616959a3ff1fea81101a77a262acb... |
bors
commented
Jan 6, 2018
💔 Test failed - status-appveyor |
eddyb
commented
Jan 6, 2018
Oddly enough, with each try the backtraces get longer, but they're still mostly |
shepmaster
commented
Jan 13, 2018
Ping from triage, @eddyb! Any luck figuring out the build issues? |
eddyb
commented
Jan 13, 2018
@shepmaster Nope, although I could try to take a fresh look and poke at it some more. |
bors
commented
Jan 16, 2018
☔ The latest upstream changes (presumably #47209) made this pull request unmergeable. Please resolve the merge conflicts. |
carols10cents
commented
Jan 22, 2018
Triage ping for you @eddyb ! Looks like there are some merge conflicts for you too. |
kennytm
commented
Jan 31, 2018
Since this PR has been inactive for more than 2 weeks, I'm closing it to keep the queue clean. Feel free to reopen anytime once the build issues have been figured out. |
Partial future-proofing for Box<T, A> In some ways, this is similar to @eddyb's PR #47043 that went stale, but doesn't cover everything. Notably, this still leaves Box internalized as a pointer in places, so practically speaking, only ZSTs can be practically added to the Box type with the changes here (the compiler ICEs otherwise). The Box type is not changed here, that's left for the future because I want to test that further first, but this puts things in place in a way that hopefully will make things easier.
@Ericson2314 is playing around with
Box<T, A = Heap>and there is still some special-casing in the compiler aroundBox, some of which is removed by this PR.Ideally we can merge this before the beta cutoff to avoid needing a
cfg(stage0)copy ofBox.r? @alexcrichton