I recently dusted off playform and ran
rustup. To my surprise, it started hanging. It turns out that upgrading the compiler past
rustc 1.20.0-nightly (3610a70ce 2017-07-05) (to the next nightly or the latest nightly) causes a hang in one of my calls to
Vec::push in a release build. If I build in debug mode, I get a segfault.
By reverting commits and building the rust compiler, it seems as though the offending commit is
commit 1685c9298685f73db4fe890c1ed27b22408aaad7 Merge: 4d526e0d14 695dee063b Author: bors <email@example.com> Date: Thu Jul 6 00:16:16 2017 +0000 Auto merge of #42727 - alexcrichton:allocators-new, r=eddyb rustc: Implement the #[global_allocator] attribute This PR is an implementation of [RFC 1974] which specifies a new method of defining a global allocator for a program. This obsoletes the old `#![allocator]` attribute and also removes support for it. [RFC 1974]: https://github.com/rust-lang/rfcs/pull/1974 The new `#[global_allocator]` attribute solves many issues encountered with the `#![allocator]` attribute such as composition and restrictions on the crate graph itself. The compiler now has much more control over the ABI of the allocator and how it's implemented, allowing much more freedom in terms of how this feature is implemented. cc #27389
Building and installing
rustc before this commit shows old behavior in playform, and building with this commit shows the new broken behavior.
This isn’t a huge commit but it does seem to touch code that has some say in allocation behavior, but I’m not familiar enough to say anything more insightful than that. If someone has any hunches or ideas for experiments I can run, that would be much appreciated.
I’m working on getting a minimal repro with minimal package dependencies but playform is a big beast with, shall we say, less-than-careful allocation so it will take a little time. The minimal repro branch is at https://github.com/bfops/playform/tree/debug-hanging.