I distinctly remember a GCC patch that added `system("rm -Rf /")` on some undefined behavior conditions. But I can't find it right now.
I distinctly remember a GCC patch that added `system("rm -Rf /")` on some undefined behavior conditions. But I can't find it right now.
Are you thinking of how early releases of GCC would (as an easter egg) run emacs, hack, or rogue upon encountering an unknown #pragma directive?
https://blog.djmnet.org/2008/08/05/a-pragmatic-decision/
I've never heard of it doing rm -rf, but apparnetly it did try to launch nethack under certain unknown preprocessor conditions:
https://feross.org/gcc-ownage/?1?1
https://gcc.gnu.org/pipermail/gcc/2002-January/074450.html