2020-06-08 19:21:17 -07:00
|
|
|
#include <stdbool.h>
|
|
|
|
#include <malloc.h>
|
|
|
|
|
2022-01-21 20:47:21 +01:00
|
|
|
#include "test_util.h"
|
2020-06-17 16:39:50 -04:00
|
|
|
|
2020-06-08 19:21:17 -07:00
|
|
|
size_t malloc_object_size(void *ptr);
|
|
|
|
|
2020-06-17 16:39:50 -04:00
|
|
|
OPTNONE int main(void) {
|
2020-06-08 19:21:17 -07:00
|
|
|
char *p = malloc(16);
|
|
|
|
size_t size = malloc_object_size(p + 5);
|
|
|
|
return size != (SLAB_CANARY ? 19 : 27);
|
|
|
|
}
|