Every calculation is possible. That's a lot less than everything.
If you write a virtual machine in a memory safe language you can simulate a double free inside the VM, but the VM won't have the same memory contents and connections to the outside world as the real machine. You won't get the same outcome.
Not possible without unsafe.
Sure it is. Have an array which you allocate from.
Everything is possible in a turing complete language.
Every calculation is possible. That's a lot less than everything.
If you write a virtual machine in a memory safe language you can simulate a double free inside the VM, but the VM won't have the same memory contents and connections to the outside world as the real machine. You won't get the same outcome.