]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Update FreeBSD memcheck/tests/freebsd/errno_aligned_allocs.c for x86
authorPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 10 May 2022 18:23:27 +0000 (20:23 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Tue, 10 May 2022 18:23:27 +0000 (20:23 +0200)
Size to force an ENOMEM on 64bit too big for 32bit.

memcheck/tests/freebsd/errno_aligned_allocs.c

index 50c4959af6d7a17d6166c4e3fa652118ca326b4c..5769cd0541a1db40fa4ffb41b62f6f3b307c13b0 100644 (file)
@@ -23,7 +23,7 @@ int main(void)
    res = posix_memalign((void**)&p, 40, 160);
    assert(p == NULL && res == EINVAL);
    // too big
-   res = posix_memalign((void**)&p, 16, 1UL<<48);
+   res = posix_memalign((void**)&p, 16, (sizeof(size_t) == 8) ? 1UL<<48 : 1UL<<31);
    assert(p == NULL && res == ENOMEM);
    errno = 0;