Remix.run Logo
cyberax 11 hours ago

I distinctly remember a GCC patch that added `system("rm -Rf /")` on some undefined behavior conditions. But I can't find it right now.

quuxplusone 10 hours ago | parent | next [-]

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/

webdevver 10 hours ago | parent | prev [-]

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