From: Paul Floyd Date: Tue, 28 Feb 2023 12:17:24 +0000 (+0100) Subject: Make memalign behave more like the underlying platform memalign X-Git-Tag: VALGRIND_3_21_0~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e862c6f3d2374beebf78b52dfc8303ff33707001;p=thirdparty%2Fvalgrind.git 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 --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........: posix_memalign (vg_replace_malloc.c:...) ... @@ -208,8 +195,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:...) ... @@ -224,8 +210,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:...) ... @@ -240,8 +225,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:...) ... @@ -256,8 +240,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:...) ... @@ -272,8 +255,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:...) ... @@ -288,8 +270,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:...) ... @@ -304,8 +285,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:...) ... @@ -317,8 +297,7 @@ dddddddddddddddd Invalid read of size 16 ... 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:...) ... @@ -333,8 +312,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -349,8 +327,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -365,8 +342,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -381,8 +357,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -397,8 +372,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -413,8 +387,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -429,8 +402,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -445,8 +417,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -461,8 +432,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -477,8 +447,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -493,8 +462,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -509,8 +477,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -525,8 +492,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -541,8 +507,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -557,8 +522,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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-64bit-le b/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-64bit-le index 55171bd660..5edfff1a5d 100644 --- a/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-64bit-le +++ b/memcheck/tests/common/sh-mem-vec128-plo-no.stderr.exp-64bit-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........: posix_memalign (vg_replace_malloc.c:...) ... @@ -208,8 +195,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:...) ... @@ -224,8 +210,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:...) ... @@ -240,8 +225,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:...) ... @@ -256,8 +240,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:...) ... @@ -272,8 +255,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:...) ... @@ -288,8 +270,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:...) ... @@ -304,8 +285,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:...) ... @@ -317,8 +297,7 @@ dddddddddddddddd Invalid read of size 16 ... 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:...) ... @@ -333,8 +312,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -349,8 +327,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -365,8 +342,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -381,8 +357,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -397,8 +372,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -413,8 +387,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -429,8 +402,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -445,8 +417,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -461,8 +432,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -477,8 +447,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -493,8 +462,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -509,8 +477,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -525,8 +492,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -541,8 +507,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -557,8 +522,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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-yes.stderr.exp-32bit-le b/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-32bit-le index 453bd4f368..a6bea42416 100644 --- a/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-32bit-le +++ b/memcheck/tests/common/sh-mem-vec128-plo-yes.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:...) ... @@ -208,8 +204,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -224,8 +219,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -240,8 +234,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -256,8 +249,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -272,8 +264,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -288,8 +279,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -304,8 +294,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -320,8 +309,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -336,8 +324,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -352,8 +339,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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 +354,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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 +369,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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 +384,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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 +399,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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 +414,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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 +429,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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-yes.stderr.exp-64bit-le b/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-64bit-le index b307328580..d05ac5e826 100644 --- a/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-64bit-le +++ b/memcheck/tests/common/sh-mem-vec128-plo-yes.stderr.exp-64bit-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:...) ... @@ -208,8 +204,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -224,8 +219,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -240,8 +234,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -256,8 +249,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -272,8 +264,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -288,8 +279,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -304,8 +294,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -320,8 +309,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -336,8 +324,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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:...) ... @@ -352,8 +339,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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 +354,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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 +369,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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 +384,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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 +399,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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 +414,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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 +429,7 @@ Conditional jump or move depends on uninitialised value(s) Invalid read of size 16 ... 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/freebsd/Makefile.am b/memcheck/tests/freebsd/Makefile.am index 5cf1eaf67e..631d0efe9e 100644 --- a/memcheck/tests/freebsd/Makefile.am +++ b/memcheck/tests/freebsd/Makefile.am @@ -99,7 +99,8 @@ EXTRA_DIST = \ bug464476_abs_symlink.stdout.exp \ bug464476_rel_symlink.vgtest \ bug464476_rel_symlink.stderr.exp \ - bug464476_rel_symlink.stdout.exp + bug464476_rel_symlink.stdout.exp \ + memalign.vgtest memalign.stderr.exp check_PROGRAMS = \ statfs pdfork_pdkill getfsstat inlinfo inlinfo_nested.so extattr \ @@ -107,7 +108,7 @@ check_PROGRAMS = \ linkat scalar_fork scalar_thr_exit scalar_abort2 scalar_pdfork \ scalar_vfork stat file_locking_wait6 utimens access chmod_chown \ misc get_set_context utimes static_allocs fexecve errno_aligned_allocs \ - setproctitle sctp sctp2 bug464476 + setproctitle sctp sctp2 bug464476 memalign AM_CFLAGS += $(AM_FLAG_M3264_PRI) AM_CXXFLAGS += $(AM_FLAG_M3264_PRI) diff --git a/memcheck/tests/freebsd/errno_aligned_allocs.c b/memcheck/tests/freebsd/errno_aligned_allocs.c index cb01da3cb6..b8954be773 100644 --- a/memcheck/tests/freebsd/errno_aligned_allocs.c +++ b/memcheck/tests/freebsd/errno_aligned_allocs.c @@ -13,15 +13,28 @@ int main(void) // zero alignment res = posix_memalign((void**)&p, 0, 8); assert(p == NULL && res == EINVAL); - // non multiple of alignment passes on FreeBSD - //res = posix_memalign((void**)&p, 8, 25); - //assert(p == NULL && res == EINVAL); // align not multiple of sizeof(void*) res = posix_memalign((void**)&p, 2, 32); assert(p == NULL && res == EINVAL); // align not power of two res = posix_memalign((void**)&p, 40, 160); assert(p == NULL && res == EINVAL); + + // digging through the jemalloc code + // the max alignment allowed is + // 0x70000000 for i386 and + // 0x7000000000000000 for amd64 + // but valgrind has a limit of only 16M + // 0x10000000 + // on both platforms + // the 64bit limit is around 1e18 bytes + // a million terabytes + + // Valgrind handles that badly. it throws a core_panic :-( + + //res = posix_memalign((void**)&p, (1UL<<63), 4096); + //assert(p == NULL && res == ENOMEM); + // too big if (sizeof(size_t) == 8) { @@ -33,7 +46,7 @@ int main(void) // if we ask for more than 2Gbytes the fishy // detector will kick in and not try to allocate // less than 2Gbytes and it's likely to succeed - // (at least on a machine just tunning VG regtests) + // (at least on a machine just running VG regtests) // so fake it p = NULL; res = ENOMEM; diff --git a/memcheck/tests/freebsd/memalign.c b/memcheck/tests/freebsd/memalign.c new file mode 100644 index 0000000000..ec79eeff94 --- /dev/null +++ b/memcheck/tests/freebsd/memalign.c @@ -0,0 +1,82 @@ +#include +#include +#include +#include "tests/malloc.h" +#include +#include "../../../config.h" + + +int main (void) +{ + int* p; + int* piece; + assert(sizeof(long int) == sizeof(void*)); + + p = memalign(1024 * 1024, 4 * 1024 * 1024 + 1); + assert(0 == (long)p % (1024 * 1024)); + piece = malloc(1024 * 1000); assert (piece); + free (piece); + free (p); + + p = memalign(1024 * 1024, 4 * 1024 * 1024 + 1); + assert(0 == (long)p % (1024 * 1024)); + piece = malloc(1024 * 100); assert (piece); + free (p); + free (piece); + + // there is a bug in FreeBSD memalign which causes + // a SIGFPE division by zero when the alignment is zero + // see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269688 + // that might ship in FreeBSD 13.2 / 14.0 + // for the moment disable this test + //p = memalign(0, 100); + //assert(!p); + p = memalign(1, 100); + assert(p && 0 == (long)p % 8); + p = memalign(2, 100); + assert(p && 0 == (long)p % 8); + errno = 0; + p = memalign(3, 100); + assert(!p); + assert(errno = EINVAL); + p = memalign(4, 100); + assert(p && 0 == (long)p % 8); + errno = 0; + p = memalign(5, 100); + assert(!p); + assert(errno = EINVAL); + errno = 0; + p = memalign(7, 100); + assert(!p); + assert(errno = EINVAL); + p = memalign(8, 100); + assert(p && 0 == (long)p % 8); + errno = 0; + p = memalign(9, 100); + assert(!p); + assert(errno = EINVAL); + errno = 0; + p = memalign(31, 100); + assert(!p); + assert(errno = EINVAL); + p = memalign(32, 100); + assert(p && 0 == (long)p % 32); + errno = 0; + p = memalign(33, 100); + assert(!p); + assert(errno = EINVAL); + errno = 0; + p = memalign(4095, 100); + assert(!p); + assert(errno = EINVAL); + p = memalign(4096, 100); + assert(p && 0 == (long)p % 4096); + errno = 0; + p = memalign(4097, 100); + assert(!p); + assert(errno = EINVAL); + p = memalign(4 * 1024 * 1024, 100); + assert(p && 0 == (long)p % (4 * 1024 * 1024)); + p = memalign(16 * 1024 * 1024, 100); + assert(p && 0 == (long)p % (16 * 1024 * 1024)); +} diff --git a/memcheck/tests/memalign2.stderr.exp b/memcheck/tests/freebsd/memalign.stderr.exp similarity index 100% rename from memcheck/tests/memalign2.stderr.exp rename to memcheck/tests/freebsd/memalign.stderr.exp diff --git a/memcheck/tests/memalign2.vgtest b/memcheck/tests/freebsd/memalign.vgtest similarity index 78% rename from memcheck/tests/memalign2.vgtest rename to memcheck/tests/freebsd/memalign.vgtest index 3d4cc718a3..f8068509fe 100644 --- a/memcheck/tests/memalign2.vgtest +++ b/memcheck/tests/freebsd/memalign.vgtest @@ -1,2 +1,2 @@ -prog: memalign2 +prog: memalign vgopts: -q --freelist-vol=100000 --freelist-big-blocks=0 diff --git a/memcheck/tests/linux/Makefile.am b/memcheck/tests/linux/Makefile.am index 64160c0c8e..af26730c37 100644 --- a/memcheck/tests/linux/Makefile.am +++ b/memcheck/tests/linux/Makefile.am @@ -33,7 +33,8 @@ EXTRA_DIST = \ sys-preadv_pwritev.vgtest sys-preadv_pwritev.stderr.exp \ sys-preadv2_pwritev2.vgtest sys-preadv2_pwritev2.stderr.exp \ sys-execveat.vgtest sys-execveat.stderr.exp sys-execveat.stdout.exp \ - enomem.vgtest enomem.stderr.exp enomem.stdout.exp + enomem.vgtest enomem.stderr.exp enomem.stdout.exp \ + memalign.vgtest memalign.stderr.exp check_PROGRAMS = \ brk \ @@ -55,7 +56,8 @@ check_PROGRAMS = \ proc-auxv \ sys-execveat \ check_execveat \ - enomem + enomem \ + memalign if HAVE_AT_FDCWD check_PROGRAMS += sys-openat diff --git a/memcheck/tests/linux/memalign.c b/memcheck/tests/linux/memalign.c new file mode 100644 index 0000000000..4e1e374978 --- /dev/null +++ b/memcheck/tests/linux/memalign.c @@ -0,0 +1,150 @@ +#include +#include +#include +#include "tests/malloc.h" +#include +#include "../../../config.h" + +int main ( void ) +{ + // Nb: assuming VG_MIN_MALLOC_SZB is 8 or more... + int* p; + int* piece; + assert(sizeof(long int) == sizeof(void*)); + +#if !defined(MUSL_LIBC) + // Check behaviour of memalign/free for big alignment. + // In particular, the below aims at checking that a + // superblock with a big size is not marked as reclaimable + // if the superblock is used to provide a big aligned block + // (see bug 250101, comment #14). + // Valgrind m_mallocfree.c will allocate a big superblock for the memalign + // call and will split it in two. This split superblock was + // wrongly marked as reclaimable, which was then causing + // assert failures (as reclaimable blocks cannot be split). + p = memalign(1024 * 1024, 4 * 1024 * 1024 + 1); + assert(p && (0 == (long)p % (1024 * 1024))); + // We allocate (and then free) a piece of memory smaller than + // the hole created in the big superblock. + // If the superblock is marked as reclaimable, the below free(s) will cause + // an assert. Note that the test has to be run with a --free-list-vol + // parameter smaller than the released blocks size to ensure the free is directly + // executed (otherwise memcheck does not really release the memory and so + // the bug is not properly tested). + piece = malloc(1024 * 1000); + assert (piece); + free (piece); + free (p); + + // Same as above but do the free in the reverse order. + p = memalign(1024 * 1024, 4 * 1024 * 1024 + 1); + assert(p && (0 == (long)p % (1024 * 1024))); + piece = malloc(1024 * 100); + assert (piece); + free (p); + free (piece); + + p = memalign(0, 100); + assert(p && (0 == (long)p % 8)); + p = memalign(1, 100); + assert(p && (0 == (long)p % 8)); + p = memalign(2, 100); + assert(p && (0 == (long)p % 8)); + p = memalign(3, 100); + assert(p && (0 == (long)p % 8)); + p = memalign(4, 100); + assert(p && (0 == (long)p % 8)); + p = memalign(5, 100); + assert(p && (0 == (long)p % 8)); + + p = memalign(7, 100); + assert(p && (0 == (long)p % 8)); + p = memalign(8, 100); + assert(p && (0 == (long)p % 8)); + p = memalign(9, 100); + assert(p && (0 == (long)p % 16)); + + p = memalign(31, 100); + assert(p && (0 == (long)p % 32)); + p = memalign(32, 100); + assert(p && (0 == (long)p % 32)); + p = memalign(33, 100); + assert(p && (0 == (long)p % 64)); + + p = memalign(4095, 100); + assert(p && (0 == (long)p % 4096)); + p = memalign(4096, 100); + assert(p && (0 == (long)p % 4096)); + p = memalign(4097, 100); + assert(p && (0 == (long)p % 8192)); + + p = memalign(4 * 1024 * 1024, 100); + assert(p && (0 == (long)p % (4 * 1024 * 1024))); + p = memalign(16 * 1024 * 1024, 100); + assert(p && (0 == (long)p % (16 * 1024 * 1024))); +#else + p = memalign(1024 * 1024, 4 * 1024 * 1024 + 1); + assert(p && (0 == (long)p % (1024 * 1024))); + piece = malloc(1024 * 1000); assert (piece); + free (piece); + free (p); + p = memalign(1024 * 1024, 4 * 1024 * 1024 + 1); + assert(p && (0 == (long)p % (1024 * 1024))); + piece = malloc(1024 * 100); + assert (piece); + free (p); + free (piece); + + errno = 0; + p = memalign(0, 100); + assert(p && (0 == (long)p % 8)); + p = memalign(1, 100); + assert(p && (0 == (long)p % 8)); + p = memalign(2, 100); + assert(p && (0 == (long)p % 8)); + p = memalign(3, 100); + assert(!p); + //assert(errno == EINVAL); + errno = 0; + p = memalign(4, 100); + assert(p && 0 == (long)p % 8); + p = memalign(5, 100); + assert(!p); + //assert(errno == EINVAL); + errno = 0; + p = memalign(7, 100); + assert(!p); + //assert(errno == EINVAL); + errno = 0; + p = memalign(8, 100); + assert(p && (0 == (long)p % 8)); + p = memalign(9, 100); + assert(!p); + //assert(errno == EINVAL); + errno = 0; + p = memalign(31, 100); + assert(!p); + //assert(errno == EINVAL); + p = memalign(32, 100); + assert(p && (0 == (long)p % 32)); + errno = 0; + p = memalign(33, 100); + assert(!p); + //assert(errno == EINVAL); + errno = 0; + p = memalign(4095, 100); + assert(!p); + //assert(errno == EINVAL); + p = memalign(4096, 100); + assert(p && (0 == (long)p % 4096)); + errno = 0; + p = memalign(4097, 100); + assert(!p); + //assert(errno == EINVAL); + + p = memalign(4 * 1024 * 1024, 100); + assert(p && (0 == (long)p % (4 * 1024 * 1024))); + p = memalign(16 * 1024 * 1024, 100); + assert(p && (0 == (long)p % (16 * 1024 * 1024))); +#endif +} diff --git a/memcheck/tests/linux/memalign.stderr.exp b/memcheck/tests/linux/memalign.stderr.exp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/memcheck/tests/linux/memalign.vgtest b/memcheck/tests/linux/memalign.vgtest new file mode 100644 index 0000000000..f8068509fe --- /dev/null +++ b/memcheck/tests/linux/memalign.vgtest @@ -0,0 +1,2 @@ +prog: memalign +vgopts: -q --freelist-vol=100000 --freelist-big-blocks=0 diff --git a/memcheck/tests/memalign2.c b/memcheck/tests/memalign2.c deleted file mode 100644 index a7bdb34c5d..0000000000 --- a/memcheck/tests/memalign2.c +++ /dev/null @@ -1,110 +0,0 @@ - -// These #defines attempt to ensure that posix_memalign() is declared, and -// so no spurious warning is given about using it. - -// Advertise compliance of the code to the XSI (a POSIX superset that -// defines what a system must be like to be called "UNIX") -#undef _XOPEN_SOURCE -#define _XOPEN_SOURCE 600 - -// Advertise compliance to POSIX -#undef _POSIX_C_SOURCE -#define _POSIX_C_SOURCE 200112L - -#include -#include -#include -#include "tests/malloc.h" -#include -#include "../../config.h" - -int main ( void ) -{ -# if defined(VGO_darwin) - // Mac OS X has neither memalign() nor posix_memalign(); do nothing. - // Still true for 10.6 / 10.7 ? - -# else - // Nb: assuming VG_MIN_MALLOC_SZB is 8 or more... - int* p; - int* piece; - int res; - assert(sizeof(long int) == sizeof(void*)); - -#if !defined(VGO_freebsd) || (FREEBSD_VERS >= FREEBSD_12_2) - // Check behaviour of memalign/free for big alignment. - // In particular, the below aims at checking that a - // superblock with a big size is not marked as reclaimable - // if the superblock is used to provide a big aligned block - // (see bug 250101, comment #14). - // Valgrind m_mallocfree.c will allocate a big superblock for the memalign - // call and will split it in two. This split superblock was - // wrongly marked as reclaimable, which was then causing - // assert failures (as reclaimable blocks cannot be split). - p = memalign(1024 * 1024, 4 * 1024 * 1024 + 1); assert(0 == (long)p % (1024 * 1024)); - // We allocate (and then free) a piece of memory smaller than - // the hole created in the big superblock. - // If the superblock is marked as reclaimable, the below free(s) will cause - // an assert. Note that the test has to be run with a --free-list-vol - // parameter smaller than the released blocks size to ensure the free is directly - // executed (otherwise memcheck does not really release the memory and so - // the bug is not properly tested). - piece = malloc(1024 * 1000); assert (piece); - free (piece); - free (p); - - // Same as above but do the free in the reverse order. - p = memalign(1024 * 1024, 4 * 1024 * 1024 + 1); assert(0 == (long)p % (1024 * 1024)); - piece = malloc(1024 * 100); assert (piece); - free (p); - free (piece); - - p = memalign(0, 100); assert(0 == (long)p % 8); - p = memalign(1, 100); assert(0 == (long)p % 8); - p = memalign(2, 100); assert(0 == (long)p % 8); - p = memalign(3, 100); assert(0 == (long)p % 8); - p = memalign(4, 100); assert(0 == (long)p % 8); - p = memalign(5, 100); assert(0 == (long)p % 8); - - p = memalign(7, 100); assert(0 == (long)p % 8); - p = memalign(8, 100); assert(0 == (long)p % 8); - p = memalign(9, 100); assert(0 == (long)p % 16); - - p = memalign(31, 100); assert(0 == (long)p % 32); - p = memalign(32, 100); assert(0 == (long)p % 32); - p = memalign(33, 100); assert(0 == (long)p % 64); - - p = memalign(4095, 100); assert(0 == (long)p % 4096); - p = memalign(4096, 100); assert(0 == (long)p % 4096); - p = memalign(4097, 100); assert(0 == (long)p % 8192); - - p = memalign(4 * 1024 * 1024, 100); assert(0 == (long)p % (4 * 1024 * 1024)); - p = memalign(16 * 1024 * 1024, 100); assert(0 == (long)p % (16 * 1024 * 1024)); -#endif - -# define PM(a,b,c) posix_memalign((void**)a, b, c) - - res = PM(&p, -1,100); assert(EINVAL == res); - res = PM(&p, 0, 100); assert(EINVAL == res); - res = PM(&p, 1, 100); assert(EINVAL == res); - res = PM(&p, 2, 100); assert(EINVAL == res); - res = PM(&p, 3, 100); assert(EINVAL == res); - res = PM(&p, sizeof(void*), 100); - assert(0 == res && 0 == (long)p % sizeof(void*)); - - res = PM(&p, 31, 100); assert(EINVAL == res); - res = PM(&p, 32, 100); assert(0 == res && 0 == (long)p % 32); - res = PM(&p, 33, 100); assert(EINVAL == res); - - res = PM(&p, 4095, 100); assert(EINVAL == res); - res = PM(&p, 4096, 100); assert(0 == res && 0 == (long)p % 4096); - res = PM(&p, 4097, 100); assert(EINVAL == res); - - res = PM(&p, 4 * 1024 * 1024, 100); assert(0 == res - && 0 == (long)p % (4 * 1024 * 1024)); - res = PM(&p, 16 * 1024 * 1024, 100); assert(0 == res - && 0 == (long)p % (16 * 1024 * 1024)); -# endif - - return 0; -} diff --git a/memcheck/tests/memalign_args.c b/memcheck/tests/memalign_args.c new file mode 100644 index 0000000000..910296857a --- /dev/null +++ b/memcheck/tests/memalign_args.c @@ -0,0 +1,29 @@ +#include +#include +#include +#include "../../config.h" +#include "../memcheck.h" + +int main(void) +{ + size_t size = 1024U; + size_t align = 64U; + char *mem; + char *p; + int res; + (void)VALGRIND_MAKE_MEM_UNDEFINED(&size, sizeof(size)); + (void)VALGRIND_MAKE_MEM_UNDEFINED(&align, sizeof(align)); +#if !defined(VGO_darwin) + p = memalign(align, size); + free(p); +#endif + + res = posix_memalign((void **)&mem,align,size); + free(mem); + + p = aligned_alloc(align, size); + free(p); + + p = valloc(size); + free(p); +} diff --git a/memcheck/tests/memalign_args.stderr.exp b/memcheck/tests/memalign_args.stderr.exp new file mode 100644 index 0000000000..112589e891 --- /dev/null +++ b/memcheck/tests/memalign_args.stderr.exp @@ -0,0 +1,32 @@ +Conditional jump or move depends on uninitialised value(s) + at 0x........: memalign (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:17) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: memalign (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:17) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: posix_memalign (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:21) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: posix_memalign (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:21) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: posix_memalign (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:21) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: aligned_alloc (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:24) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: aligned_alloc (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:24) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: valloc (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:27) + diff --git a/memcheck/tests/memalign_args.stderr.exp-glibc b/memcheck/tests/memalign_args.stderr.exp-glibc new file mode 100644 index 0000000000..def6892ba3 --- /dev/null +++ b/memcheck/tests/memalign_args.stderr.exp-glibc @@ -0,0 +1,32 @@ +Conditional jump or move depends on uninitialised value(s) + at 0x........: memalign (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:17) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: memalign (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:17) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: posix_memalign (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:21) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: posix_memalign (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:21) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: posix_memalign (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:21) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: memalign (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:24) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: memalign (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:24) + +Conditional jump or move depends on uninitialised value(s) + at 0x........: valloc (vg_replace_malloc.c:...) + by 0x........: main (memalign_args.c:27) + diff --git a/memcheck/tests/memalign_args.vgtest b/memcheck/tests/memalign_args.vgtest new file mode 100644 index 0000000000..852e75e0dd --- /dev/null +++ b/memcheck/tests/memalign_args.vgtest @@ -0,0 +1,3 @@ +prog: memalign_args +vgopts: -q + diff --git a/memcheck/tests/memalign_test.stderr.exp b/memcheck/tests/memalign_test.stderr.exp index e9dc1afe50..a71377383f 100644 --- a/memcheck/tests/memalign_test.stderr.exp +++ b/memcheck/tests/memalign_test.stderr.exp @@ -5,7 +5,6 @@ Invalid free() / delete / delete[] / realloc() at 0x........: free (vg_replace_malloc.c:...) by 0x........: main (memalign_test.c:23) Block was alloc'd at - at 0x........: memalign (vg_replace_malloc.c:...) - by 0x........: valloc (vg_replace_malloc.c:...) + at 0x........: valloc (vg_replace_malloc.c:...) by 0x........: main (memalign_test.c:16) diff --git a/memcheck/tests/memalign_test.stderr.exp-freebsd-clang b/memcheck/tests/memalign_test.stderr.exp-freebsd-clang index f625f2200d..a71377383f 100644 --- a/memcheck/tests/memalign_test.stderr.exp-freebsd-clang +++ b/memcheck/tests/memalign_test.stderr.exp-freebsd-clang @@ -5,6 +5,6 @@ Invalid free() / delete / delete[] / realloc() at 0x........: free (vg_replace_malloc.c:...) by 0x........: main (memalign_test.c:23) Block was alloc'd at - at 0x........: memalign (vg_replace_malloc.c:...) + at 0x........: valloc (vg_replace_malloc.c:...) by 0x........: main (memalign_test.c:16) diff --git a/memcheck/tests/posix_memalign.c b/memcheck/tests/posix_memalign.c new file mode 100644 index 0000000000..415c6c025b --- /dev/null +++ b/memcheck/tests/posix_memalign.c @@ -0,0 +1,52 @@ + +// These #defines attempt to ensure that posix_memalign() is declared, and +// so no spurious warning is given about using it. + +// Advertise compliance of the code to the XSI (a POSIX superset that +// defines what a system must be like to be called "UNIX") +#undef _XOPEN_SOURCE +#define _XOPEN_SOURCE 600 + +// Advertise compliance to POSIX +#undef _POSIX_C_SOURCE +#define _POSIX_C_SOURCE 200112L + +#include +#include +#include +#include "tests/malloc.h" +#include +#include "../../config.h" + +int main ( void ) +{ +# if !defined(VGO_darwin) || (DARWIN_VERS >= DARWIN_10_6) + // Nb: assuming VG_MIN_MALLOC_SZB is 8 or more... + int* p; + int res; + assert(sizeof(long int) == sizeof(void*)); + +# define PM(a,b,c) posix_memalign((void**)a, b, c) + + res = PM(&p, -1,100); assert(EINVAL == res); + res = PM(&p, 0, 100); assert(EINVAL == res); + res = PM(&p, 1, 100); assert(EINVAL == res); + res = PM(&p, 2, 100); assert(EINVAL == res); + res = PM(&p, 3, 100); assert(EINVAL == res); + res = PM(&p, sizeof(void*), 100); + assert(0 == res && 0 == (long)p % sizeof(void*)); + + res = PM(&p, 31, 100); assert(EINVAL == res); + res = PM(&p, 32, 100); assert(0 == res && 0 == (long)p % 32); + res = PM(&p, 33, 100); assert(EINVAL == res); + + res = PM(&p, 4095, 100); assert(EINVAL == res); + res = PM(&p, 4096, 100); assert(0 == res && 0 == (long)p % 4096); + res = PM(&p, 4097, 100); assert(EINVAL == res); + + res = PM(&p, 4 * 1024 * 1024, 100); assert(0 == res + && 0 == (long)p % (4 * 1024 * 1024)); + res = PM(&p, 16 * 1024 * 1024, 100); assert(0 == res + && 0 == (long)p % (16 * 1024 * 1024)); +#endif +} diff --git a/memcheck/tests/posix_memalign.stderr.exp b/memcheck/tests/posix_memalign.stderr.exp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/memcheck/tests/posix_memalign.vgtest b/memcheck/tests/posix_memalign.vgtest new file mode 100644 index 0000000000..306a54e1e4 --- /dev/null +++ b/memcheck/tests/posix_memalign.vgtest @@ -0,0 +1,2 @@ +prog: posix_memalign +vgopts: -q --freelist-vol=100000 --freelist-big-blocks=0 diff --git a/memcheck/tests/solaris/Makefile.am b/memcheck/tests/solaris/Makefile.am index 3a71e16aa7..024856901c 100644 --- a/memcheck/tests/solaris/Makefile.am +++ b/memcheck/tests/solaris/Makefile.am @@ -54,7 +54,8 @@ EXTRA_DIST = \ supponlyobj.stderr.exp supponlyobj.supp supponlyobj.vgtest \ syscall_at.stderr.exp syscall_at.stdout.exp syscall_at.vgtest \ thr_daemon_exit_libc.stderr.exp thr_daemon_exit_libc.stdout.exp thr_daemon_exit_libc.vgtest \ - thr_daemon_exit_standalone.stderr.exp thr_daemon_exit_standalone.stdout.exp thr_daemon_exit_standalone.vgtest + thr_daemon_exit_standalone.stderr.exp thr_daemon_exit_standalone.stdout.exp thr_daemon_exit_standalone.vgtest \ + memalign.vgtest memalign.stderr.exp check_PROGRAMS = \ brk \ @@ -79,7 +80,8 @@ check_PROGRAMS = \ strlcpy \ syscall_at \ thr_daemon_exit_libc \ - thr_daemon_exit_standalone + thr_daemon_exit_standalone \ + memalign if SOLARIS_EXECVE_SYSCALL_TAKES_FLAGS check_PROGRAMS += execx diff --git a/memcheck/tests/solaris/memalign.c b/memcheck/tests/solaris/memalign.c new file mode 100644 index 0000000000..f8d26b73c7 --- /dev/null +++ b/memcheck/tests/solaris/memalign.c @@ -0,0 +1,94 @@ +#include +#include +#include +#include "tests/malloc.h" +#include +#include "../../../config.h" + + +int main (void) +{ + int* p; + int* piece; + assert(sizeof(long int) == sizeof(void*)); + + p = memalign(1024 * 1024, 4 * 1024 * 1024 + 1); + assert(0 == (long)p % (1024 * 1024)); + piece = malloc(1024 * 1000); assert (piece); + free (piece); + free (p); + + p = memalign(1024 * 1024, 4 * 1024 * 1024 + 1); + assert(0 == (long)p % (1024 * 1024)); + piece = malloc(1024 * 100); assert (piece); + free (p); + free (piece); + + // Illumos doesn't allow a size of 0 + errno = 0; + p = memalign(64, 0); + assert(!p); + assert(errno == EINVAL); + + // Doesn't allow an alignment of 0 either + p = memalign(0, 100); + assert(!p); + assert(errno == EINVAL); + + // and most peculiar compared to other memaligns + // the alignment must be a multiple of 4 + // but not necessarily a power of 2 + + // I think that the + p = memalign(1, 100); + assert(!p); + assert(errno == EINVAL); + p = memalign(2, 100); + assert(!p); + assert(errno == EINVAL); + p = memalign(3, 100); + assert(!p); + assert(errno == EINVAL); + p = memalign(4, 100); + assert(p && 0 == (long)p % 8); + p = memalign(5, 100); + assert(!p); + assert(errno == EINVAL); + errno = 0; + p = memalign(7, 100); + assert(!p); + assert(errno == EINVAL); + p = memalign(8, 100); + assert(p && 0 == (long)p % 8); + errno= 0; + p = memalign(9, 100); + assert(!p); + assert(errno == EINVAL); + p = memalign(12, 100); + assert(p && 0 == (long)p % 16); + errno = 0; + p = memalign(31, 100); + assert(!p); + assert(errno == EINVAL); + p = memalign(32, 100); + assert(p && 0 == (long)p % 32); + errno = 0; + p = memalign(33, 100); + assert(!p); + assert(errno == EINVAL); + errno = 0; + p = memalign(4095, 100); + assert(!p); + assert(errno == EINVAL); + p = memalign(4096, 100); + assert(p && 0 == (long)p % 4096); + errno = 0; + p = memalign(4097, 100); + assert(!p); + assert(errno == EINVAL); + + p = memalign(4 * 1024 * 1024, 100); + assert(p && 0 == (long)p % (4 * 1024 * 1024)); + p = memalign(16 * 1024 * 1024, 100); + assert(p && 0 == (long)p % (16 * 1024 * 1024)); +} diff --git a/memcheck/tests/solaris/memalign.stderr.exp b/memcheck/tests/solaris/memalign.stderr.exp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/memcheck/tests/solaris/memalign.vgtest b/memcheck/tests/solaris/memalign.vgtest new file mode 100644 index 0000000000..f8068509fe --- /dev/null +++ b/memcheck/tests/solaris/memalign.vgtest @@ -0,0 +1,2 @@ +prog: memalign +vgopts: -q --freelist-vol=100000 --freelist-big-blocks=0 diff --git a/memcheck/tests/test-plo-no.stderr.exp-le64-freebsd b/memcheck/tests/test-plo-no.stderr.exp-le64-freebsd index 9ab2ef2d14..e131211c5c 100644 --- a/memcheck/tests/test-plo-no.stderr.exp-le64-freebsd +++ b/memcheck/tests/test-plo-no.stderr.exp-le64-freebsd @@ -1,15 +1,13 @@ Invalid read of size 8 ... Address 0x........ is 0 bytes inside a block of size 5 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 read of size 8 ... Address 0x........ is 0 bytes inside a block of size 5 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 read of size 8