We've had challenges for SIGSEGV and SIGILL so why not...
Write the shortest code that results in a Bus Error (SIGBUS) in any programming language.
Your program can't call raise()
or kill(getpid(),sig)
or pthread_kill(pthread_self(),sig)
, or any other equivalent.
raise(11)
. They can be trivially modified to beraise(7)
instead for this challenge. \$\endgroup\$System.exit(#);
where you only change the # to throw a different exit code... This is a very trivial difference in many languages. \$\endgroup\$