|
From: Paul F. <pa...@so...> - 2023-03-05 15:01:58
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=bf8d5b9a52ce063c3467d9e95b36014f93cd14b6 commit bf8d5b9a52ce063c3467d9e95b36014f93cd14b6 Author: Paul Floyd <pj...@wa...> Date: Sun Mar 5 16:01:23 2023 +0100 Solaris: copy paste error in alignment check for aligned_alloc Diff: --- coregrind/m_replacemalloc/vg_replace_malloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index 719d011410..09c1dccdb1 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -1981,8 +1981,8 @@ extern int *___errno (void) __attribute__((weak)); (ULong)alignment, (ULong)size ); \ if (alignment == 0 \ || (VG_ALIGNED_ALLOC_SIZE_MULTIPLE_ALIGN && (size % alignment != 0)) \ - || (VG_ALIGNED_ALLOC_ALIGN_POWER_TWO && (alignment & (alignment - 1)) != 0) \ - || (VG_ALIGNED_ALLOC_ALIGN_FACTOR_FOUR && (size % 4 != 0))) { \ + || (VG_ALIGNED_ALLOC_ALIGN_POWER_TWO && (alignment & (alignment - 1)) != 0) \ + || (VG_ALIGNED_ALLOC_ALIGN_FACTOR_FOUR && (alignment % 4 != 0))) { \ SET_ERRNO_EINVAL; \ return 0; \ } \ |