Skip to content

Instantly share code, notes, and snippets.

@compor
Created March 28, 2014 10:39
Show Gist options
  • Save compor/9829856 to your computer and use it in GitHub Desktop.
Save compor/9829856 to your computer and use it in GitHub Desktop.
weird C goto label (to its own body) as function return address
#include <stdio.h>
void *
f(void) {
a:
printf("here!\n");
return &&a;
}
int
main(int argc, char **argv) {
goto *f();
printf("there\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment