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