summaryrefslogtreecommitdiff
path: root/test/underflow.c
blob: e8cadf535cca88bd7904ec184c7ae173a52271f0 (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[-1] = '\0';
	printf("shouldn't get here\n");
}