To take the point more seriously than you intended it: this is (apparently) a bug in a code generator. The C++ itself wasn't unsafe and didn't crash, it emitted binary code that did. A Rust/Python/whatever JIT could trivially have the same bug.
Commenters aren't suggesting Rust because it's not an area where implementation language is able to provide safety.