Skip to content

Commit 3a11d7d

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

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

regression/cbmc/posix_memalign/main.c

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include <stdlib.h>
2+
#include <string.h>
3+
4+
int main()
5+
{
6+
size_t size = 4;
7+
size_t page_size = 4096;
8+
void *src = "testing";
9+
void *dest;
10+
if(posix_memalign(&dest, page_size, size))
11+
{
12+
return -1;
13+
}
14+
memcpy(dest, src, size);
15+
return 0;
16+
}
+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)