Open
Description
PRINCIPLES.md
says:
No use-after-move. All types abort if they are used after a move.
However:
TEST(Vec, UseAfterMoveAllowsCreatingBadPointer) {
struct T {
uint8_t pre_padding[0xBAD'0000];
int field;
};
auto x = Vec<T>();
auto y = std::move(x);
int* bad_ptr = &x[0].field; // Use-after-move but does not abort.
printf("%p\n", bad_ptr); // Prints "0xbad0000\n".
}
Is this Working As Intended?