|
From: Paul F. <pa...@so...> - 2023-02-28 12:46:49
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=e862c6f3d2374beebf78b52dfc8303ff33707001 commit e862c6f3d2374beebf78b52dfc8303ff33707001 Author: Paul Floyd <pj...@wa...> Date: Tue Feb 28 13:17:24 2023 +0100 Make memalign behave more like the underlying platform memalign This is the first part of Bug 466104 aligned_alloc problems, part 1 The bulk of this change is try try to get memalign to be more platform aware. Previously the Valgrind implementation only reflected the glibc implementation. That meant non-power of two alignment values would silently get bumped up to the next largest power of two. Most other platforms return NULL and set errno to EINVAL. There are a few other changes. A couple of the other aligned alloc functions like valloc were caling the Valgrind memalign. This meant that there weould be an extra Valgrind memalign in any error callstacks. Now these functions call the allocator directly. The memcheck memalign2 testcase has been redone. The memalign parts moved out to per-platform versions and the tescase itdelf renamed to posix_memalign, since that is all that is left. I also modified the testcase so that it checks that the memalign calls check for non-NULL returns, and on platforms that set errno that it is correctly set. Previously the test only worked on non-glibc because NULL & alignment is zero. The platform versions have been tested on glibc, MUSL, FreeBSD and OpenIndiana and should hopefully run OK both under memcheck and standalone. There is stil quite a lot that is NOT done 1. I'm not certain that implementations allocate more memory and/or use a wider alignment. It doesn't help that almost universally the memalign implementations are badly documented, undocumented or buggy. 2. We don't handle very large alignment requests well. Most implementations will fail and set EINVAL if the alignment is over half the memory space. Valgrind will core panic if an aligmnt of over 16Mbytes is requested. 3. We don't generate any memcheck errors for invalid values of alignment. That's planned in Part 2. 4. The code is static and fixed at compile time. That means that if you are using MUSL with a glibc-built Valgrind you will still get glibc memalign behaviour. I'll wait to see if there are any requests before trying to make the behaviour selectable at runtime. Diff: --- .gitignore | 62 +++--- coregrind/m_mallocfree.c | 22 ++- coregrind/m_replacemalloc/vg_replace_malloc.c | 211 +++++++++++++++++---- memcheck/tests/Makefile.am | 8 +- .../tests/amd64/sh-mem-vec256-plo-no.stderr.exp | 159 ++++++---------- .../tests/amd64/sh-mem-vec256-plo-yes.stderr.exp | 108 ++++------- .../sh-mem-vec128-plo-no.stderr.exp-32bit-le | 108 ++++------- .../sh-mem-vec128-plo-no.stderr.exp-64bit-le | 108 ++++------- .../sh-mem-vec128-plo-yes.stderr.exp-32bit-le | 60 ++---- .../sh-mem-vec128-plo-yes.stderr.exp-64bit-le | 60 ++---- memcheck/tests/freebsd/Makefile.am | 5 +- memcheck/tests/freebsd/errno_aligned_allocs.c | 21 +- memcheck/tests/freebsd/memalign.c | 82 ++++++++ .../memalign.stderr.exp} | 0 .../{memalign2.vgtest => freebsd/memalign.vgtest} | 2 +- memcheck/tests/linux/Makefile.am | 6 +- memcheck/tests/linux/memalign.c | 150 +++++++++++++++ memcheck/tests/linux/memalign.stderr.exp | 0 memcheck/tests/linux/memalign.vgtest | 2 + memcheck/tests/memalign2.c | 110 ----------- memcheck/tests/memalign_args.c | 29 +++ memcheck/tests/memalign_args.stderr.exp | 32 ++++ memcheck/tests/memalign_args.stderr.exp-glibc | 32 ++++ memcheck/tests/memalign_args.vgtest | 3 + memcheck/tests/memalign_test.stderr.exp | 3 +- .../tests/memalign_test.stderr.exp-freebsd-clang | 2 +- memcheck/tests/posix_memalign.c | 52 +++++ memcheck/tests/posix_memalign.stderr.exp | 0 memcheck/tests/posix_memalign.vgtest | 2 + memcheck/tests/solaris/Makefile.am | 6 +- memcheck/tests/solaris/memalign.c | 94 +++++++++ memcheck/tests/solaris/memalign.stderr.exp | 0 memcheck/tests/solaris/memalign.vgtest | 2 + memcheck/tests/test-plo-no.stderr.exp-le64-freebsd | 6 +- 34 files changed, 944 insertions(+), 603 deletions(-) diff --git a/.gitignore b/.gitignore index cc6b189b4b..7cd35cc9e3 100644 --- a/.gitignore +++ b/.gitignore @@ -914,7 +914,7 @@ /memcheck/tests/manuel2 /memcheck/tests/manuel3 /memcheck/tests/match-overrun -/memcheck/tests/memalign2 +/memcheck/tests/memalign_args /memcheck/tests/memalign_test /memcheck/tests/memcmptest /memcheck/tests/memmem @@ -944,6 +944,7 @@ /memcheck/tests/pdb-realloc2 /memcheck/tests/pipe /memcheck/tests/pointer-trace +/memcheck/tests/posix_memalign /memcheck/tests/post-syscall /memcheck/tests/reach_thread_register /memcheck/tests/realloc1 @@ -1109,6 +1110,7 @@ /memcheck/tests/linux/lsframe2 /memcheck/tests/linux/Makefile /memcheck/tests/linux/Makefile.in +/memcheck/tests/linux/memalign /memcheck/tests/linux/memfd_create /memcheck/tests/linux/rfcomm /memcheck/tests/linux/sigqueue @@ -1205,6 +1207,7 @@ /memcheck/tests/solaris/ldynsym /memcheck/tests/solaris/lsframe1 /memcheck/tests/solaris/lsframe2 +/memcheck/tests/solaris/memalign /memcheck/tests/solaris/mmapobj_bssonly /memcheck/tests/solaris/mmapobj_bssonly.so /memcheck/tests/solaris/name_service_door @@ -1321,45 +1324,46 @@ /memcheck/tests/freebsd/.deps /memcheck/tests/freebsd/Makefile /memcheck/tests/freebsd/Makefile.in -/memcheck/tests/freebsd/statfs -/memcheck/tests/freebsd/pdfork_pdkill +/memcheck/tests/freebsd/452275 +/memcheck/tests/freebsd/access +/memcheck/tests/freebsd/bug464476 +/memcheck/tests/freebsd/capsicum +/memcheck/tests/freebsd/chflags +/memcheck/tests/freebsd/chmod_chown +/memcheck/tests/freebsd/errno_aligned_allocs +/memcheck/tests/freebsd/eventfd1 +/memcheck/tests/freebsd/eventfd2 +/memcheck/tests/freebsd/extattr +/memcheck/tests/freebsd/fexecve +/memcheck/tests/freebsd/file_locking_wait6 +/memcheck/tests/freebsd/get_set_context +/memcheck/tests/freebsd/get_set_login +/memcheck/tests/freebsd/getfh /memcheck/tests/freebsd/getfsstat /memcheck/tests/freebsd/inlinfo /memcheck/tests/freebsd/inlinfo_nested.so -/memcheck/tests/freebsd/extattr -/memcheck/tests/freebsd/sigwait -/memcheck/tests/freebsd/chflags -/memcheck/tests/freebsd/get_set_login +/memcheck/tests/freebsd/linkat +/memcheck/tests/freebsd/memalign +/memcheck/tests/freebsd/misc +/memcheck/tests/freebsd/pdfork_pdkill +/memcheck/tests/freebsd/realpathat /memcheck/tests/freebsd/revoke /memcheck/tests/freebsd/scalar -/memcheck/tests/freebsd/capsicum -/memcheck/tests/freebsd/getfh -/memcheck/tests/freebsd/linkat -/memcheck/tests/freebsd/scalar_fork -/memcheck/tests/freebsd/scalar_thr_exit +/memcheck/tests/freebsd/scalar_13_plus /memcheck/tests/freebsd/scalar_abort2 +/memcheck/tests/freebsd/scalar_fork /memcheck/tests/freebsd/scalar_pdfork +/memcheck/tests/freebsd/scalar_thr_exit /memcheck/tests/freebsd/scalar_vfork +/memcheck/tests/freebsd/sctp +/memcheck/tests/freebsd/sctp2 +/memcheck/tests/freebsd/setproctitle +/memcheck/tests/freebsd/sigwait /memcheck/tests/freebsd/stat -/memcheck/tests/freebsd/file_locking_wait6 +/memcheck/tests/freebsd/statfs +/memcheck/tests/freebsd/static_allocs /memcheck/tests/freebsd/utimens -/memcheck/tests/freebsd/access -/memcheck/tests/freebsd/chmod_chown -/memcheck/tests/freebsd/misc -/memcheck/tests/freebsd/get_set_context /memcheck/tests/freebsd/utimes -/memcheck/tests/freebsd/static_allocs -/memcheck/tests/freebsd/fexecve -/memcheck/tests/freebsd/eventfd1 -/memcheck/tests/freebsd/eventfd2 -/memcheck/tests/freebsd/realpathat -/memcheck/tests/freebsd/scalar_13_plus -/memcheck/tests/freebsd/452275 -/memcheck/tests/freebsd/errno_aligned_allocs -/memcheck/tests/freebsd/setproctitle -/memcheck/tests/freebsd/sctp -/memcheck/tests/freebsd/sctp2 -/memcheck/tests/freebsd/bug464476 # /memcheck/tests/amd64-freebsd /memcheck/tests/amd64-freebsd/*.stderr.diff diff --git a/coregrind/m_mallocfree.c b/coregrind/m_mallocfree.c index 90c7d9aac9..a51c9aa730 100644 --- a/coregrind/m_mallocfree.c +++ b/coregrind/m_mallocfree.c @@ -2239,12 +2239,26 @@ void* VG_(arena_memalign) ( ArenaId aid, const HChar* cc, // Check that the requested alignment has a plausible size. // Check that the requested alignment seems reasonable; that is, is // a power of 2. - if (req_alignB < VG_MIN_MALLOC_SZB - || req_alignB > 16 * 1024 * 1024 - || VG_(log2)( req_alignB ) == -1 /* not a power of 2 */) { + if (req_alignB < VG_MIN_MALLOC_SZB) { VG_(printf)("VG_(arena_memalign)(%p, %lu, %lu)\n" "bad alignment value %lu\n" - "(it is too small, too big, or not a power of two)", + "(it is too small, below the lower limit of %d)", + a, req_alignB, req_pszB, req_alignB, VG_MIN_MALLOC_SZB ); + VG_(core_panic)("VG_(arena_memalign)"); + /*NOTREACHED*/ + } + if (req_alignB > 16 * 1024 * 1024) { + VG_(printf)("VG_(arena_memalign)(%p, %lu, %lu)\n" + "bad alignment value %lu\n" + "(it is too big, larger than the upper limit of %d)", + a, req_alignB, req_pszB, req_alignB, 16 * 1024 * 1024 ); + VG_(core_panic)("VG_(arena_memalign)"); + /*NOTREACHED*/ + } + if (VG_(log2)( req_alignB ) == -1 /* not a power of 2 */) { + VG_(printf)("VG_(arena_memalign)(%p, %lu, %lu)\n" + "bad alignment value %lu\n" + "(it is not a power of two)", a, req_alignB, req_pszB, req_alignB ); VG_(core_panic)("VG_(arena_memalign)"); /*NOTREACHED*/ diff --git a/coregrind/m_replacemalloc/vg_replace_malloc.c b/coregrind/m_replacemalloc/vg_replace_malloc.c index eb087676ca..0b591a7c83 100644 --- a/coregrind/m_replacemalloc/vg_replace_malloc.c +++ b/coregrind/m_replacemalloc/vg_replace_malloc.c @@ -68,6 +68,8 @@ #include "pub_core_redir.h" // for VG_REPLACE_FUNCTION_* #include "pub_core_replacemalloc.h" +#define VG_ALIGN_ROUNDUP(size, alignment) ((size + alignment - 1) & ~(alignment - 1)) + /* Assignment of behavioural equivalence class tags: 1NNNP is intended to be reserved for the Valgrind core. Current usage: @@ -193,6 +195,10 @@ static void init(void); if (info.clo_trace_malloc) { \ VALGRIND_INTERNAL_PRINTF(format, ## args ); } +// @todo PJF this mechanism doesn't work for MUSL C +// not sure why +// source here https://elixir.bootlin.com/musl/latest/source/src/errno/__errno_location.c#L4 + /* Tries to set ERRNO to ENOMEM/EINVAL if possible. */ #if defined(VGO_linux) extern int *__errno_location (void) __attribute__((weak)); @@ -1472,20 +1478,49 @@ extern int *___errno (void) __attribute__((weak)); /*---------------------- memalign ----------------------*/ -#define ZONEMEMALIGN(soname, fnname) \ + /* + * memalign is rather old and deprecated + * Linux glibc will fixup the alignment + * (unless it is greater than SIZE_MAX / 2 + 1 + * in which case it returns EINVAL) + * + * musl libc just calls aligned_alloc + * + * FreeBSD, undocumented, just calls aligned_alloc + * with size rounded up to a multiple + * of aligment + * + * jemalloc mininum alignment is 1, must be a power of 2 + * it looks like excessively large alignment causes ENOMEM + * + * Illumos does not allow an alignment of zero + * Nor a size of zero + * And the alignment must be a multiple of 4 + * (though the man page says that the alignment + * must be a power of 2 at least the size of a word) + * + * Does not exist on Darwin + * + * tcmalloc seems to behave like glibc and we have + * no way to switch at runtime + * + */ + +#if defined(VGO_linux) +#if !defined(MUSL_LIBC) +#define MEMALIGN(soname, fnname) \ \ - void* VG_REPLACE_FUNCTION_EZU(10100,soname,fnname) \ - ( void *zone, SizeT alignment, SizeT n ); \ - void* VG_REPLACE_FUNCTION_EZU(10100,soname,fnname) \ - ( void *zone, SizeT alignment, SizeT n ) \ + void* VG_REPLACE_FUNCTION_EZU(10110,soname,fnname) \ + ( SizeT alignment, SizeT n ); \ + void* VG_REPLACE_FUNCTION_EZU(10110,soname,fnname) \ + ( SizeT alignment, SizeT n ) \ { \ void* v; \ \ DO_INIT; \ - TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED((UWord) zone); \ TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ - MALLOC_TRACE("zone_memalign(%p, al %llu, size %llu)", \ - zone, (ULong)alignment, (ULong)n ); \ + MALLOC_TRACE("memalign(al %llu, size %llu)", \ + (ULong)alignment, (ULong)n ); \ \ /* Round up to minimum alignment if necessary. */ \ if (alignment < VG_MIN_MALLOC_SZB) \ @@ -1499,34 +1534,111 @@ extern int *___errno (void) __attribute__((weak)); if (!v) SET_ERRNO_ENOMEM; \ return v; \ } - +#else /* MUSL_LIBC */ #define MEMALIGN(soname, fnname) \ \ void* VG_REPLACE_FUNCTION_EZU(10110,soname,fnname) \ - ( SizeT alignment, SizeT n ); \ + ( SizeT alignment, SizeT size ); \ void* VG_REPLACE_FUNCTION_EZU(10110,soname,fnname) \ - ( SizeT alignment, SizeT n ) \ + ( SizeT alignment, SizeT size ) \ { \ - void* v; \ + void *mem; \ \ DO_INIT; \ - TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(n); \ - MALLOC_TRACE("memalign(al %llu, size %llu)", \ - (ULong)alignment, (ULong)n ); \ + if ((alignment & (alignment - 1)) != 0) { \ + SET_ERRNO_EINVAL; \ + return 0; \ + } \ + /* Round up to minimum alignment if necessary. */ \ + if (alignment < VG_MIN_MALLOC_SZB) \ + alignment = VG_MIN_MALLOC_SZB; \ + \ + mem = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_memalign, alignment, size ); \ \ + if (!mem) SET_ERRNO_ENOMEM; \ + \ + return mem; \ + } +#endif + +#elif defined(VGO_freebsd) + +#define MEMALIGN(soname, fnname) \ + \ + void* VG_REPLACE_FUNCTION_EZU(10110,soname,fnname) \ + ( SizeT alignment, SizeT size ); \ + void* VG_REPLACE_FUNCTION_EZU(10110,soname,fnname) \ + ( SizeT alignment, SizeT size ) \ + { \ + void *mem; \ + \ + DO_INIT; \ + TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(size); \ + MALLOC_TRACE("memalign(al %llu, size %llu)\n", \ + (ULong)alignment, (ULong)size ); \ + if ((alignment & (alignment - 1)) != 0) { \ + SET_ERRNO_EINVAL; \ + return 0; \ + } \ /* Round up to minimum alignment if necessary. */ \ - if (alignment < VG_MIN_MALLOC_SZB) \ - alignment = VG_MIN_MALLOC_SZB; \ + if (alignment < VG_MIN_MALLOC_SZB) \ + alignment = VG_MIN_MALLOC_SZB; \ \ - /* Round up to nearest power-of-two if necessary (like glibc). */ \ - while (0 != (alignment & (alignment - 1))) alignment++; \ + mem = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_memalign, \ + alignment, VG_ALIGN_ROUNDUP(size, alignment) ); \ \ - v = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_memalign, alignment, n ); \ - MALLOC_TRACE(" = %p\n", v ); \ - if (!v) SET_ERRNO_ENOMEM; \ - return v; \ + if (!mem) SET_ERRNO_ENOMEM; \ + \ + return mem; \ } +#elif defined(VGO_solaris) + +// In the Illumos source there is a macro MINSIZE +// which is sizeof (TREE) - sizeof (WORD) +// struct TREE contains 6 WORDS +// so MINSIZE is 5 words +// +// In gdb I get the impression that sizeof (WORD) is 16 +#define VG_MEMALIGN_MINSIZE (5*VG_WORDSIZE) + +#define MEMALIGN(soname, fnname) \ + \ + void* VG_REPLACE_FUNCTION_EZU(10110,soname,fnname) \ + ( SizeT alignment, SizeT size ); \ + void* VG_REPLACE_FUNCTION_EZU(10110,soname,fnname) \ + ( SizeT alignment, SizeT size ) \ + { \ + void *mem; \ + \ + DO_INIT; \ + MALLOC_TRACE("memalign(al %llu, size %llu)\n", \ + (ULong)alignment, (ULong)size ); \ + if (alignment == 0 \ + || (size == 0) \ + || (alignment & 3)) { \ + SET_ERRNO_EINVAL; \ + return 0; \ + } \ + size = VG_ALIGN_ROUNDUP(size, VG_WORDSIZE); \ + if (size < VG_MEMALIGN_MINSIZE) \ + size = VG_MEMALIGN_MINSIZE; \ + alignment = VG_ALIGN_ROUNDUP(alignment, VG_WORDSIZE); \ + while (alignment < VG_MEMALIGN_MINSIZE + VG_WORDSIZE) \ + alignment <<= 1U; \ + \ + mem = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_memalign, \ + alignment, VG_ALIGN_ROUNDUP(size, alignment) ); \ + \ + if (!mem) SET_ERRNO_ENOMEM; \ + \ + return mem; \ + } + +// no Darwin + +#endif + #if defined(VGO_linux) MEMALIGN(VG_Z_LIBC_SONAME, memalign); MEMALIGN(SO_SYN_MALLOC, memalign); @@ -1535,12 +1647,6 @@ extern int *___errno (void) __attribute__((weak)); MEMALIGN(VG_Z_LIBC_SONAME, memalign); MEMALIGN(SO_SYN_MALLOC, memalign); -#elif defined(VGO_darwin) - MEMALIGN(VG_Z_LIBC_SONAME, memalign); - MEMALIGN(SO_SYN_MALLOC, memalign); - ZONEMEMALIGN(VG_Z_LIBC_SONAME, malloc_zone_memalign); - ZONEMEMALIGN(SO_SYN_MALLOC, malloc_zone_memalign); - #elif defined(VGO_solaris) MEMALIGN(VG_Z_LIBC_SONAME, memalign); MEMALIGN(VG_Z_LIBUMEM_SO_1, memalign); @@ -1556,11 +1662,18 @@ extern int *___errno (void) __attribute__((weak)); void* VG_REPLACE_FUNCTION_EZU(10120,soname,fnname) ( SizeT size ); \ void* VG_REPLACE_FUNCTION_EZU(10120,soname,fnname) ( SizeT size ) \ { \ + void *mem; \ static int pszB = 0; \ if (pszB == 0) \ pszB = my_getpagesize(); \ - return VG_REPLACE_FUNCTION_EZU(10110,VG_Z_LIBC_SONAME,memalign) \ - ((SizeT)pszB, size); \ + DO_INIT; \ + TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(size); \ + mem = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_memalign, \ + pszB, size ); \ + \ + if (!mem) SET_ERRNO_ENOMEM; \ + \ + return mem; \ } #define ZONEVALLOC(soname, fnname) \ @@ -1681,15 +1794,23 @@ extern int *___errno (void) __attribute__((weak)); { \ void *mem; \ \ + DO_INIT; \ + TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(size); \ + MALLOC_TRACE("posix_memalign(al %llu, size %llu)\n", \ + (ULong)alignment, (ULong)size ); \ /* Test whether the alignment argument is valid. It must be \ a power of two multiple of sizeof (void *). */ \ if (alignment == 0 \ || alignment % sizeof (void *) != 0 \ - || (alignment & (alignment - 1)) != 0) \ + || (alignment & (alignment - 1)) != 0) { \ return VKI_EINVAL; \ + } \ + /* Round up to minimum alignment if necessary. */ \ + if (alignment < VG_MIN_MALLOC_SZB) \ + alignment = VG_MIN_MALLOC_SZB; \ \ - mem = VG_REPLACE_FUNCTION_EZU(10110,VG_Z_LIBC_SONAME,memalign) \ - (alignment, size); \ + mem = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_memalign, \ + alignment, size ); \ \ if (mem != NULL) { \ *memptr = mem; \ @@ -1721,13 +1842,21 @@ extern int *___errno (void) __attribute__((weak)); /* * No OS does things the same way. * - * Linux, the man page claims that the alignment must be a power - * of two and that size should be a multiple of alignment. + * The C standard says "If the value of _alignment_ is not a valid + * alignment supported by the implementation the function shall + * fail by returning a null pointer". + * + * Linux glibc, the man page claims that the alignment must be + * a power of two and that size should be a multiple of alignment. * However the only case that returns EINVAL (glibc 2.34) * is if the alignement is > SIZE_MAX / 2 + 1 * Also this is just a weak alias for memalign so this wrapper * has no effect on Linux. * + * Linux musl, the alignment must be a power of 2 else + * returns einval. The value of the alignment is clamped + * to a minumum of UNIT (16). + * * FreeBSD. the man page claims alignment must be a power of 2. * UB if size is not an integral multiple of alignment. * The code checks that the alignment is a power of @@ -1753,6 +1882,10 @@ extern int *___errno (void) __attribute__((weak)); { \ void *mem; \ \ + TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(alignment); \ + TRIGGER_MEMCHECK_ERROR_IF_UNDEFINED(size); \ + MALLOC_TRACE("aligned_alloc(al %llu, size %llu)", \ + (ULong)alignment, (ULong)size ); \ /* Test whether the alignment argument is valid. It must be \ a power of two multiple of sizeof (void *). */ \ if (alignment == 0 \ @@ -1777,6 +1910,8 @@ extern int *___errno (void) __attribute__((weak)); { \ void *mem; \ \ + MALLOC_TRACE("aligned_alloc(al %llu, size %llu)", \ + (ULong)alignment, (ULong)size ); \ if (alignment == 0 \ || size % alignment != 0 \ || (alignment & (alignment - 1)) != 0) { \ @@ -1784,8 +1919,8 @@ extern int *___errno (void) __attribute__((weak)); return 0; \ } \ \ - mem = VG_REPLACE_FUNCTION_EZU(10110,VG_Z_LIBC_SONAME,memalign) \ - (alignment, size); \ + mem = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_memalign, \ + alignment, size ); \ \ if (!mem) SET_ERRNO_ENOMEM; \ \ diff --git a/memcheck/tests/Makefile.am b/memcheck/tests/Makefile.am index efffe7b1c2..e4bf0af207 100644 --- a/memcheck/tests/Makefile.am +++ b/memcheck/tests/Makefile.am @@ -217,7 +217,8 @@ EXTRA_DIST = \ match-overrun.stderr.exp match-overrun.vgtest match-overrun.supp \ memalign_test.stderr.exp memalign_test.vgtest \ memalign_test.stderr.exp-freebsd-clang \ - memalign2.stderr.exp memalign2.vgtest \ + memalign_args.vgtest memalign_args.stderr.exp \ + memalign_args.stderr.exp-glibc \ memcmptest.stderr.exp memcmptest.stderr.exp2 \ memcmptest.stdout.exp memcmptest.vgtest \ memmem.stderr.exp memmem.vgtest \ @@ -272,6 +273,7 @@ EXTRA_DIST = \ pipe.stderr.exp pipe.vgtest \ pointer-trace.vgtest \ pointer-trace.stderr.exp \ + posix_memalign.stderr.exp posix_memalign.vgtest \ post-syscall.stderr.exp post-syscall.vgtest \ reach_thread_register.stderr.exp reach_thread_register.vgtest \ reach_thread_register.stderr.exp-mips32 \ @@ -417,7 +419,8 @@ check_PROGRAMS = \ malloc_free_fill \ malloc_usable malloc1 malloc2 malloc3 manuel1 manuel2 manuel3 \ match-overrun \ - memalign_test memalign2 memcmptest mempool mempool2 mmaptest \ + memalign_test memcmptest mempool mempool2 mmaptest \ + memalign_args \ memmem \ mismatches new_override metadata \ nanoleak_supp nanoleak2 new_nothrow \ @@ -429,6 +432,7 @@ check_PROGRAMS = \ partiallydefinedeq \ partial_load pdb-realloc pdb-realloc2 \ pipe pointer-trace \ + posix_memalign \ post-syscall \ realloc1 realloc2 realloc3 \ recursive-merge \ diff --git a/memcheck/tests/amd64/sh-mem-vec256-plo-no.stderr.exp b/memcheck/tests/amd64/sh-mem-vec256-plo-no.stderr.exp index e85fc6232e..d27c1f4504 100644 --- a/memcheck/tests/amd64/sh-mem-vec256-plo-no.stderr.exp +++ b/memcheck/tests/amd64/sh-mem-vec256-plo-no.stderr.exp @@ -28,15 +28,13 @@ Expect 2 x error Invalid read of size 32 ... Address 0x........ is 1 bytes before a block of size 80,000 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... Invalid write of size 8 ... Address 0x........ is 1 bytes before a block of size 80,000 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -47,15 +45,13 @@ Expect 2 x error Invalid read of size 32 ... Address 0x........ is 79,969 bytes inside a block of size 80,000 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... Invalid write of size 8 ... Address 0x........ is 79,993 bytes inside a block of size 80,000 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -64,8 +60,7 @@ Invalid write of size 8 Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -80,8 +75,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -96,8 +90,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -112,8 +105,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -128,8 +120,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -144,8 +135,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -160,8 +150,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -176,8 +165,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -192,8 +180,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -208,8 +195,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -224,8 +210,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -240,8 +225,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -256,8 +240,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -272,8 +255,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -288,8 +270,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -304,8 +285,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -320,8 +300,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -336,8 +315,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -352,8 +330,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -368,8 +345,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -384,8 +360,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -400,8 +375,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -416,8 +390,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -432,8 +405,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -448,8 +420,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -464,8 +435,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -480,8 +450,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -496,8 +465,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -512,8 +480,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -528,8 +495,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -544,8 +510,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -560,8 +525,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -573,8 +537,7 @@ dddddddddddddddddddddddddddddddd Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -589,8 +552,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -605,8 +567,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -621,8 +582,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -637,8 +597,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -653,8 +612,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -669,8 +627,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -685,8 +642,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -701,8 +657,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -717,8 +672,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -733,8 +687,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -749,8 +702,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -765,8 +717,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -781,8 +732,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -797,8 +747,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -813,8 +762,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -829,8 +777,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... diff --git a/memcheck/tests/amd64/sh-mem-vec256-plo-yes.stderr.exp b/memcheck/tests/amd64/sh-mem-vec256-plo-yes.stderr.exp index 2abe31d18f..c8ce5dd25c 100644 --- a/memcheck/tests/amd64/sh-mem-vec256-plo-yes.stderr.exp +++ b/memcheck/tests/amd64/sh-mem-vec256-plo-yes.stderr.exp @@ -28,15 +28,13 @@ Expect 2 x error Invalid read of size 32 ... Address 0x........ is 1 bytes before a block of size 80,000 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... Invalid write of size 8 ... Address 0x........ is 1 bytes before a block of size 80,000 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -47,15 +45,13 @@ Expect 2 x error Invalid read of size 32 ... Address 0x........ is 79,969 bytes inside a block of size 80,000 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... Invalid write of size 8 ... Address 0x........ is 79,993 bytes inside a block of size 80,000 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -352,8 +348,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -368,8 +363,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -384,8 +378,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -400,8 +393,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -416,8 +408,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -432,8 +423,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -448,8 +438,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -464,8 +453,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -480,8 +468,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -496,8 +483,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -512,8 +498,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -528,8 +513,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -544,8 +528,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -560,8 +543,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -576,8 +558,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -592,8 +573,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -608,8 +588,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -624,8 +603,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -640,8 +618,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -656,8 +633,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -672,8 +648,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -688,8 +663,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -704,8 +678,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -720,8 +693,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -736,8 +708,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -752,8 +723,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -768,8 +738,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -784,8 +753,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -800,8 +768,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -816,8 +783,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -832,8 +798,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -848,8 +813,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 32 ... Address 0x........ is 1 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... diff --git a/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-32bit-le b/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-32bit-le index 77dc067405..b4cdfe84ba 100644 --- a/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-32bit-le +++ b/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-32bit-le @@ -28,15 +28,13 @@ Expect 2 x error Invalid read of size 16 ... Address 0x........ is 1 bytes before a block of size 80,000 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... Invalid write of size 8 ... Address 0x........ is 1 bytes before a block of size 80,000 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -47,15 +45,13 @@ Expect 2 x error Invalid read of size 16 ... Address 0x........ is 79,985 bytes inside a block of size 80,000 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... Invalid write of size 8 ... Address 0x........ is 79,993 bytes inside a block of size 80,000 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -64,8 +60,7 @@ Invalid write of size 8 Invalid read of size 16 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -80,8 +75,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -96,8 +90,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -112,8 +105,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -128,8 +120,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -144,8 +135,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -160,8 +150,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -176,8 +165,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: posix_memalign (vg_replace_malloc.c:...) ... @@ -192,8 +180,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... Address 0x........ is 0 bytes inside a block of size 64 alloc'd - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: posix_memalign (vg_replace_malloc.c:...) + at 0x........: ... [truncated message content] |