]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Darwin regtest: another test using aligned_alloc
authorPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 1 Apr 2023 19:11:58 +0000 (21:11 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Sat, 1 Apr 2023 19:11:58 +0000 (21:11 +0200)
I added this test because I wanted to check the behaviour of
aligned_alloc on current macOS, but Valgrind doesn't support it
yet.

memcheck/tests/darwin/aligned_alloc.c

index 1c2fdb78cb86c1e515191428b4926dff38900232..bcbae51fe40417e95909e5a35f0c9f4bb4cbf375 100644 (file)
@@ -1,8 +1,11 @@
 #include <stdlib.h>
 #include <assert.h>
+#include "../../../config.h"
 
 int main(void)
 {
+   // @todo PJF this is a placeholder for 10.15 and later support
+#if !defined(VGO_darwin)
    char* p = NULL;
 
    // zero size
@@ -14,6 +17,7 @@ int main(void)
    // align not power of 2
    p = aligned_alloc(40, 160);
    assert(p == NULL);
+#endif
 
    // @todo PJF this works standalone
    // but for some reason it doesn't fail in arena_memalign