#include #include #include #include #include int main(int argc, char* argv[]) { int i; char *discard; // Hit the allocator over the head with a brick until it gives us superpages. for (i = 0; i < 4096 ; i++) { discard = malloc(65536); } char* badptr; // This probably isn't mapped. badptr = (void*)0x6767726567617465; printf("Attempting to crash.\n"); char c = *badptr; /* is supposed to segfault.... */ printf("You should never see this.\n"); return 0; }