6 #include "../../memcheck.h"
11 VALGRIND_DO_LEAK_CHECK
;
12 pi
= reallocarray(pi
, 10U, sizeof(int));
13 VALGRIND_DO_ADDED_LEAK_CHECK
;
14 pi
= reallocarray(pi
, 0U, sizeof(int));
15 VALGRIND_DO_ADDED_LEAK_CHECK
;
17 pi
= reallocarray(pi
, 10U, 0U);
18 VALGRIND_DO_CHANGED_LEAK_CHECK
;
20 pi
= reallocarray(pi
, 10U, sizeof(int));
21 VALGRIND_DO_ADDED_LEAK_CHECK
;
23 pi
= reallocarray(pi
, 1UL << 49, 1U);
25 assert(errno
== ENOMEM
);
26 VALGRIND_DO_CHANGED_LEAK_CHECK
;
27 pi
= reallocarray(pi
, SIZE_MAX
/1000U, SIZE_MAX
/1000U);
29 assert(errno
== ENOMEM
);
30 VALGRIND_DO_CHANGED_LEAK_CHECK
;