Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Timeline for Shortest code to throw SIGILL

Current License: CC BY-SA 3.0

9 events
when toggle format what by license comment
Jun 17, 2020 at 9:04 history edited Community Bot
Commonmark migration
Nov 24, 2016 at 9:31 comment added Ruslan @PeterCordes ah, I've misread your comment. You didn't actually claim that 00 is a one-byte illegal instruction as I had read it.
Nov 24, 2016 at 9:17 comment added Peter Cordes @Ruslan: They aren't; 00 00 decodes the same in x86-64 (as add [rax], al). 00 00 0f 0b would usually SIGSEGV before SIGILL, unless you happened to have a writeable pointer in rax.
Nov 24, 2016 at 7:46 comment added Ruslan @PeterCordes why would 00 00 be illegal in x86-64? It's still, as it was in x86, mere add [eax],al, which is perfectly legal.
Nov 21, 2016 at 4:44 comment added Peter Cordes @wchargin: We count bytes for machine-code functions / programs like you'd expect. See some of my answers, like Adler32 in 32 bytes of x86-64 machine code, or GCD in 8 bytes of x86-32 machine code.
Nov 21, 2016 at 4:43 comment added Peter Cordes @wchargin: that's an x86 + GNU C answer. This one is portable to all GNU systems. Also note that UD2 is only 2 bytes. IDK where you got those 00 bytes; they're not part of the machine code for UD2. BTW, as I commented on Dennis's answer, there are one-byte illegal instructions in x86-64 for now, but they're not guaranteed to stay that way.
Nov 20, 2016 at 16:08 comment added wchargin Also, I don't know how we count bytes for raw assembly, but 00 00 0f 0b is the machine language for ud2...
Nov 20, 2016 at 16:06 comment added wchargin −6: main(){asm("ud2");}
Nov 20, 2016 at 9:56 history answered user62131 CC BY-SA 3.0

AltStyle によって変換されたページ (->オリジナル) /