Skip to content

Commit a073502

Browse files
committed
Adds a test for posix_memalign in stdlib.c
This commit tests the changes introduced in 15aa61f
1 parent c5519ec commit a073502

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

regression/cbmc/posix_memalign/main.c

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include <malloc.h>
2+
#include <stdlib.h>
3+
#include <string.h>
4+
5+
int main()
6+
{
7+
size_t size = 4;
8+
size_t page_size = 4096;
9+
void *src = "testing";
10+
void *dest;
11+
if(posix_memalign(&dest, page_size, size))
12+
{
13+
return -1;
14+
}
15+
memcpy(dest, src, size);
16+
return 0;
17+
}
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
CORE
2+
main.c
3+
--pointer-check --bounds-check
4+
VERIFICATION SUCCESSFUL
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
--
8+
^\*\*\*\* WARNING: no body for function posix_memalign

0 commit comments

Comments
 (0)