2 ms·
> People freak out because it crashes your program People freak out because it _doesn't_ crash your program (until it's running in production of course). On my
by mlindner 6y ago
> People freak out because it crashes your program
People freak out because it _doesn't_ crash your program (until it's running in production of course). On my system without optimizations it prints "xyz" just fine, with optimizations it prints nothing, even though I'm accessing to the middle of memory. I think on most systems this will not actually crash unless you have explicit out of bounds memory tracking inserted into code by the compiler every access slowing down your code.
The point is in Rust this wouldn't even compile.
I'd be curious if you ran your text editor through a memory sanitizer like valgrind and how many issues it points out.
- pjmlp 6y agoIn VC++ also not, as I do static analysis as part of the build.