/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
/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
/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
/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
/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
// 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*/
#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:
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));
/*---------------------- 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) \
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);
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);
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) \
{ \
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; \
/*
* 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
{ \
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 \
{ \
void *mem; \
\
+ MALLOC_TRACE("aligned_alloc(al %llu, size %llu)", \
+ (ULong)alignment, (ULong)size ); \
if (alignment == 0 \
|| size % alignment != 0 \
|| (alignment & (alignment - 1)) != 0) { \
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; \
\
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 \
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 \
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 \
partiallydefinedeq \
partial_load pdb-realloc pdb-realloc2 \
pipe pointer-trace \
+ posix_memalign \
post-syscall \
realloc1 realloc2 realloc3 \
recursive-merge \
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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:...)
...
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 \
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)
// 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)
{
// 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;
--- /dev/null
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include "tests/malloc.h"
+#include <errno.h>
+#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));
+}
-prog: memalign2
+prog: memalign
vgopts: -q --freelist-vol=100000 --freelist-big-blocks=0
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 \
proc-auxv \
sys-execveat \
check_execveat \
- enomem
+ enomem \
+ memalign
if HAVE_AT_FDCWD
check_PROGRAMS += sys-openat
--- /dev/null
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include "tests/malloc.h"
+#include <errno.h>
+#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
+}
--- /dev/null
+prog: memalign
+vgopts: -q --freelist-vol=100000 --freelist-big-blocks=0
+++ /dev/null
-
-// 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 <stdlib.h>
-#include <stdio.h>
-#include <assert.h>
-#include "tests/malloc.h"
-#include <errno.h>
-#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;
-}
--- /dev/null
+#include <stdlib.h>
+#include <malloc.h>
+#include <unistd.h>
+#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);
+}
--- /dev/null
+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)
+
--- /dev/null
+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)
+
--- /dev/null
+prog: memalign_args
+vgopts: -q
+
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)
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)
--- /dev/null
+
+// 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 <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include "tests/malloc.h"
+#include <errno.h>
+#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
+}
--- /dev/null
+prog: posix_memalign
+vgopts: -q --freelist-vol=100000 --freelist-big-blocks=0
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 \
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
--- /dev/null
+#include <stdlib.h>
+#include <stdio.h>
+#include <assert.h>
+#include "tests/malloc.h"
+#include <errno.h>
+#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));
+}
--- /dev/null
+prog: memalign
+vgopts: -q --freelist-vol=100000 --freelist-big-blocks=0
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