In some i386/x86_64 assembly code my coworker was working on, there was a macro like this:
#define ENDFUNC leave ret
Having forgotten about the exact implementation of the macro, he then wrote a function that ended like this:
Now this obviously ended the function with
leave leave ret
and he got very interesting results. What was happening?