brintos

brintos / llvm-project-archived public Read only

0
0
Text · 505 B · 14a9eb6 Raw
25 lines · c
1#include <stdio.h>2 3// This example is meant to recurse infinitely.4// The extra struct is just to make the frame dump5// more complicated.6 7struct Foo {8  int a;9  int b;10  char *c;11};12 13int14forgot_termination(int input, struct Foo my_foo) {15  char frame_increasing_buffer[0x1000]; // To blow the stack sooner.16  return forgot_termination(++input, my_foo);17}18 19int20main()21{22  struct Foo myFoo = {100, 300, "A string you will print a lot"}; // Set a breakpoint here23  return forgot_termination(1, myFoo);24}25