#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
int a = 4;
int b;
void foo(void) { }
int main(int argc, char * argv []) {
int c = 2;
void * p = malloc(1024);
printf("[?????] argv = %p \n", (void *) argv);
printf("[stack] &c = %p \n", (void *) &c);
printf("[heap ] p = %p \n", (void *) p);
printf("[.bss ] &b = %p \n", (void *) &b);
printf("[.data] &a = %p \n", (void *) &a);
printf("[.text] &foo = %p \n", (void *) (size_t) &foo);
raise(SIGQUIT);
free(p); // oof
return 0;
} // main
Created
January 27, 2019 00:29
-
-
Save mepcotterell/c597ff1526fed4e527efbecdd63ccb22 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment