2022-02-07 16:24:57 +05:30
|
|
|
#include <stdlib.h>
|
2020-06-18 07:29:44 +05:30
|
|
|
|
2022-01-22 01:17:21 +05:30
|
|
|
#include "test_util.h"
|
2022-01-02 18:00:34 +05:30
|
|
|
|
2020-06-18 07:29:44 +05:30
|
|
|
size_t malloc_object_size(void *ptr);
|
|
|
|
|
2022-01-02 18:00:34 +05:30
|
|
|
OPTNONE int main(void) {
|
2020-06-18 07:29:44 +05:30
|
|
|
char *p = malloc(16);
|
|
|
|
if (!p) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
char *q = p + 4096 * 4;
|
|
|
|
malloc_object_size(q);
|
|
|
|
return 0;
|
|
|
|
}
|