summaryrefslogtreecommitdiff
path: root/test/overflow.c
blob: 67da24ab0d8ee4f435820c063bc0479726da03ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#define _POSIX_C_SOURCE 200809L
#include <stdio.h>
#include <unistd.h>
#include "mapalloc.h"

int main(void)
{
	char *ptr = MA_malloc(1);
	long pagesize = sysconf(_SC_PAGESIZE);
	printf("ptr: %p, pagesize %ld\n", ptr, pagesize);
	ptr[pagesize] = '\0';
	printf("shouldn't get here\n");
}