By using memory that you are not supposed to use, you are entering the territory of undefined behavior. It doesn't crash today on your machine. But the behavior could change without warning.
For what it's worth, when I run the same code on my cygwin shell, I get