Capturing action recommendations from BF investigation.
A LOT of technical details are included in BF-27032 for this.
firstname.lastname@example.org summarized well here:
std::shuffle has a bug in which it will sometimes try to swap an object with itself. This results in a self move of the object. Some stl types (including vector) had bugs relating to self move operations and debug assertions that they cannot be move assigned to themselves. These problems are fixed in the v4 toolchain due to fixes in libstdc+, but these fixes are not present in the v3 toolchain. We need to upgrade libstdc+ in the v3 toolchain so that these containers have the fixes for self moves.
The toolchain v3 standard library would need to be patched or abandoned to get us past this.
It's unknown at this time what the impact of leaving v3 toolchain unpatched would be. We'd have to study the faulty move operations and write tests against them. My guess is that this would be at least as much work as patching the toolchain, likely more. In the meantime we're looking at undefined behavior or worse and we should not let that continue.
It's also possible the answer here is to have C++ engineers study the self-move bugs in the standard library implementations more closely.