aboutsummaryrefslogtreecommitdiff
path: root/tests/stack.c
blob: 3f89d8bbb3dc97309bbaf1ded42eabbe69a7a2e2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdio.h>
#include <stdlib.h>

void rec(int *ip);

/* stack.c -- Cause a stack overflow */
int main(void) {
    int i = 0;
    rec(&i);
}
void rec(int *ip) {
    char i[256];
    printf("%u\n", (*ip)++);
    rec(ip);
}