From: Julian Seward Date: Fri, 16 Aug 2013 08:34:10 +0000 (+0000) Subject: Add test cases for 256-bit --partial-loads-ok=no|yes, by generalising the X-Git-Tag: svn/VALGRIND_3_9_0~190 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=423678ee8a540a37f4ca7973eede3912e3387d55;p=thirdparty%2Fvalgrind.git Add test cases for 256-bit --partial-loads-ok=no|yes, by generalising the 128-bit versions. (Patrick J. LoPresti, lopresti@gmail.com). Bug 294285. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13501 --- diff --git a/memcheck/tests/amd64/Makefile.am b/memcheck/tests/amd64/Makefile.am index 648a13f080..7fd5a19726 100644 --- a/memcheck/tests/amd64/Makefile.am +++ b/memcheck/tests/amd64/Makefile.am @@ -24,6 +24,12 @@ EXTRA_DIST = \ sh-mem-vec128-plo-yes.vgtest \ sh-mem-vec128-plo-yes.stderr.exp \ sh-mem-vec128-plo-yes.stdout.exp \ + sh-mem-vec256-plo-no.vgtest \ + sh-mem-vec256-plo-no.stderr.exp \ + sh-mem-vec256-plo-no.stdout.exp \ + sh-mem-vec256-plo-yes.vgtest \ + sh-mem-vec256-plo-yes.stderr.exp \ + sh-mem-vec256-plo-yes.stdout.exp \ sse_memory.stderr.exp sse_memory.stdout.exp sse_memory.vgtest \ xor-undef-amd64.stderr.exp xor-undef-amd64.stdout.exp \ xor-undef-amd64.vgtest @@ -38,6 +44,7 @@ check_PROGRAMS = \ insn-pmovmskb \ more_x87_fp \ sh-mem-vec128 \ + sh-mem-vec256 \ sse_memory \ xor-undef-amd64 diff --git a/memcheck/tests/amd64/sh-mem-vec128.c b/memcheck/tests/amd64/sh-mem-vec128.c index a5d0a1db81..29b7137855 100644 --- a/memcheck/tests/amd64/sh-mem-vec128.c +++ b/memcheck/tests/amd64/sh-mem-vec128.c @@ -3,12 +3,14 @@ // required vector-copy function, and then including the // template. +#define VECTOR_BYTES 16 + static __attribute__((noinline)) -void vector16_copy ( void* dst, void* src ) +void vector_copy ( void* dst, void* src ) { __asm__ __volatile__( "movups (%1), %%xmm7 ; movups %%xmm7, (%0)" - : /*OUT*/ : /*IN*/ "r"(dst), "r"(src) : "memory","xmm7" + : /*OUT*/ : /*IN*/ "r"(dst), "r"(src) : "memory","xmm7" ); } diff --git a/memcheck/tests/amd64/sh-mem-vec256-plo-no.stderr.exp b/memcheck/tests/amd64/sh-mem-vec256-plo-no.stderr.exp new file mode 100644 index 0000000000..e4d60a5594 --- /dev/null +++ b/memcheck/tests/amd64/sh-mem-vec256-plo-no.stderr.exp @@ -0,0 +1,942 @@ + +sh-mem-vec256: config: little-endian, 64-bit word size + +19543 109 126 31 206 54 112 34 102 152 335 1 36 0 23 33 + 203 7 50 141 18 261 24 189 248 15 11 0 145 304 228 457 + 4 367 20 32 269 3 319 51 448 85 88 166 21 228 238 41 + 298 39 98 35 90 64 0 254 817 91 328 214 163 64 0 266 + 214 347 234 32 536 233 13 171 91 42 332 189 177 14 81 142 + 313 400 77 4 48 114 3 113 324 87 525 413 205 184 126 294 + 182 0 244 88 0 254 45 134 226 248 0 27 262 0 173 244 + 494 165 241 116 217 32 112 0 117 335 230 79 193 174 60 243 + 19 94 163 16 59 184 1 79 247 214 378 142 239 253 0 61 + 50 48 0 304 196 109 109 186 9 389 389 7 329 157 283 234 + 4 724 74 247 99 92 35 376 242 54 309 549 23 264 61 143 + 87 0 22 96 148 563 411 54 288 34 2 14 33 88 73 339 + 122 18 347 145 208 251 266 265 3 261 146 207 831 213 146 59 + 119 18 117 303 132 315 296 70 210 707 138 537 29 492 86 188 + 292 6 312 158 32 107 0 259 53 379 45 115 38 324 36 32 + 0 264 235 135 192 262 40 0 401 38 157 20 0 160 325 18430 + +160000 copies, 26427 d_aligned, 26424 s_aligned, 6016 both_aligned +0 failures + +Expect 2 x no error + +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:...) + ... + +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:...) + ... + + +Expect 2 x no error + +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:...) + ... + +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:...) + ... + + +------ PL Aligned case with 0 leading acc+def bytes ------ + +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:...) + ... + + +dUddUddUddUddUddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 1 leading acc+def bytes ------ + +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:...) + ... + + +ddUddUddUddUddUddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 2 leading acc+def bytes ------ + +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:...) + ... + + +dddUddUddUddUddUddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 3 leading acc+def bytes ------ + +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:...) + ... + + +ddddUddUddUddUddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 4 leading acc+def bytes ------ + +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:...) + ... + + +dddddUddUddUddUddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 5 leading acc+def bytes ------ + +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:...) + ... + + +ddddddUddUddUddUddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 6 leading acc+def bytes ------ + +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:...) + ... + + +dddddddUddUddUddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 7 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddUddUddUddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 8 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddUddUddUddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 9 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddUddUddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 10 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddUddUddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 11 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddUddUddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 12 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddUddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 13 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddUddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 14 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddUddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 15 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 16 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 17 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 18 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 19 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddddddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 20 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 21 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddddddddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 22 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddddddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 23 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddddddddddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 24 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddddddddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 25 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddddddddddddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 26 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddddddddddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 27 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddddddddddddddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 28 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddddddddddddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 29 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddddddddddddddddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 30 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddddddddddddddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 31 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddddddddddddddd + + +------ PL Unaligned case with 0 leading acc+def bytes ------ + +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:...) + ... + + +dUddUddUddUddUddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 1 leading acc+def bytes ------ + +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:...) + ... + + +ddUddUddUddUddUddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 2 leading acc+def bytes ------ + +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:...) + ... + + +dddUddUddUddUddUddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 3 leading acc+def bytes ------ + +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:...) + ... + + +ddddUddUddUddUddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 4 leading acc+def bytes ------ + +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:...) + ... + + +dddddUddUddUddUddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 5 leading acc+def bytes ------ + +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:...) + ... + + +ddddddUddUddUddUddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 6 leading acc+def bytes ------ + +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:...) + ... + + +dddddddUddUddUddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 7 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddUddUddUddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 8 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddUddUddUddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 9 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddUddUddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 10 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddUddUddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 11 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddUddUddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 12 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddUddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 13 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddUddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 14 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddUddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 15 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 16 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddUddUddUddUddUdd + + +More than 100 errors detected. Subsequent errors +will still be recorded, but in less detail than before. + +------ PL Unaligned case with 17 leading acc+def bytes ------ + + +ddddddddddddddddddUddUddUddUddUd + + +------ PL Unaligned case with 18 leading acc+def bytes ------ + + +dddddddddddddddddddUddUddUddUddU + + +------ PL Unaligned case with 19 leading acc+def bytes ------ + + +ddddddddddddddddddddUddUddUddUdd + + +------ PL Unaligned case with 20 leading acc+def bytes ------ + + +dddddddddddddddddddddUddUddUddUd + + +------ PL Unaligned case with 21 leading acc+def bytes ------ + + +ddddddddddddddddddddddUddUddUddU + + +------ PL Unaligned case with 22 leading acc+def bytes ------ + + +dddddddddddddddddddddddUddUddUdd + + +------ PL Unaligned case with 23 leading acc+def bytes ------ + + +ddddddddddddddddddddddddUddUddUd + + +------ PL Unaligned case with 24 leading acc+def bytes ------ + + +dddddddddddddddddddddddddUddUddU + + +------ PL Unaligned case with 25 leading acc+def bytes ------ + + +ddddddddddddddddddddddddddUddUdd + + +------ PL Unaligned case with 26 leading acc+def bytes ------ + + +dddddddddddddddddddddddddddUddUd + + +------ PL Unaligned case with 27 leading acc+def bytes ------ + + +ddddddddddddddddddddddddddddUddU + + +------ PL Unaligned case with 28 leading acc+def bytes ------ + + +dddddddddddddddddddddddddddddUdd + + +------ PL Unaligned case with 29 leading acc+def bytes ------ + + +ddddddddddddddddddddddddddddddUd + + +------ PL Unaligned case with 30 leading acc+def bytes ------ + + +dddddddddddddddddddddddddddddddU + + +------ PL Unaligned case with 31 leading acc+def bytes ------ + + +dddddddddddddddddddddddddddddddd + + + +HEAP SUMMARY: + in use at exit: 0 bytes in 0 blocks + total heap usage: 65 allocs, 65 frees, 84,096 bytes allocated + +For a detailed leak analysis, rerun with: --leak-check=full + +For counts of detected and suppressed errors, rerun with: -v +Use --track-origins=yes to see where uninitialised values come from +ERROR SUMMARY: 130 errors from 100 contexts (suppressed: 0 from 0) diff --git a/memcheck/tests/amd64/sh-mem-vec256-plo-no.stdout.exp b/memcheck/tests/amd64/sh-mem-vec256-plo-no.stdout.exp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/memcheck/tests/amd64/sh-mem-vec256-plo-no.vgtest b/memcheck/tests/amd64/sh-mem-vec256-plo-no.vgtest new file mode 100644 index 0000000000..f6bcef4ab4 --- /dev/null +++ b/memcheck/tests/amd64/sh-mem-vec256-plo-no.vgtest @@ -0,0 +1,4 @@ +prog: sh-mem-vec256 +prereq: ../../../tests/x86_amd64_features amd64-avx +args: -q +vgopts: --partial-loads-ok=no diff --git a/memcheck/tests/amd64/sh-mem-vec256-plo-yes.stderr.exp b/memcheck/tests/amd64/sh-mem-vec256-plo-yes.stderr.exp new file mode 100644 index 0000000000..366bcc0a76 --- /dev/null +++ b/memcheck/tests/amd64/sh-mem-vec256-plo-yes.stderr.exp @@ -0,0 +1,868 @@ + +sh-mem-vec256: config: little-endian, 64-bit word size + +19543 109 126 31 206 54 112 34 102 152 335 1 36 0 23 33 + 203 7 50 141 18 261 24 189 248 15 11 0 145 304 228 457 + 4 367 20 32 269 3 319 51 448 85 88 166 21 228 238 41 + 298 39 98 35 90 64 0 254 817 91 328 214 163 64 0 266 + 214 347 234 32 536 233 13 171 91 42 332 189 177 14 81 142 + 313 400 77 4 48 114 3 113 324 87 525 413 205 184 126 294 + 182 0 244 88 0 254 45 134 226 248 0 27 262 0 173 244 + 494 165 241 116 217 32 112 0 117 335 230 79 193 174 60 243 + 19 94 163 16 59 184 1 79 247 214 378 142 239 253 0 61 + 50 48 0 304 196 109 109 186 9 389 389 7 329 157 283 234 + 4 724 74 247 99 92 35 376 242 54 309 549 23 264 61 143 + 87 0 22 96 148 563 411 54 288 34 2 14 33 88 73 339 + 122 18 347 145 208 251 266 265 3 261 146 207 831 213 146 59 + 119 18 117 303 132 315 296 70 210 707 138 537 29 492 86 188 + 292 6 312 158 32 107 0 259 53 379 45 115 38 324 36 32 + 0 264 235 135 192 262 40 0 401 38 157 20 0 160 325 18430 + +160000 copies, 26427 d_aligned, 26424 s_aligned, 6016 both_aligned +0 failures + +Expect 2 x no error + +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:...) + ... + +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:...) + ... + + +Expect 2 x no error + +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:...) + ... + +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:...) + ... + + +------ PL Aligned case with 0 leading acc+def bytes ------ + + +UUdUUdUUdUUdUUdUUdUUdUUdUUdUUdUU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 1 leading acc+def bytes ------ + + +dUUdUUdUUdUUdUUdUUdUUdUUdUUdUUdU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 2 leading acc+def bytes ------ + + +ddUUdUUdUUdUUdUUdUUdUUdUUdUUdUUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 3 leading acc+def bytes ------ + + +dddUUdUUdUUdUUdUUdUUdUUdUUdUUdUU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 4 leading acc+def bytes ------ + + +ddddUUdUUdUUdUUdUUdUUdUUdUUdUUdU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 5 leading acc+def bytes ------ + + +dddddUUdUUdUUdUUdUUdUUdUUdUUdUUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 6 leading acc+def bytes ------ + + +ddddddUUdUUdUUdUUdUUdUUdUUdUUdUU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 7 leading acc+def bytes ------ + + +dddddddUUdUUdUUdUUdUUdUUdUUdUUdU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 8 leading acc+def bytes ------ + + +ddddddddUUdUUdUUdUUdUUdUUdUUdUUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 9 leading acc+def bytes ------ + + +dddddddddUUdUUdUUdUUdUUdUUdUUdUU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 10 leading acc+def bytes ------ + + +ddddddddddUUdUUdUUdUUdUUdUUdUUdU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 11 leading acc+def bytes ------ + + +dddddddddddUUdUUdUUdUUdUUdUUdUUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 12 leading acc+def bytes ------ + + +ddddddddddddUUdUUdUUdUUdUUdUUdUU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 13 leading acc+def bytes ------ + + +dddddddddddddUUdUUdUUdUUdUUdUUdU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 14 leading acc+def bytes ------ + + +ddddddddddddddUUdUUdUUdUUdUUdUUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 15 leading acc+def bytes ------ + + +dddddddddddddddUUdUUdUUdUUdUUdUU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 16 leading acc+def bytes ------ + + +ddddddddddddddddUUdUUdUUdUUdUUdU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 17 leading acc+def bytes ------ + + +dddddddddddddddddUUdUUdUUdUUdUUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 18 leading acc+def bytes ------ + + +ddddddddddddddddddUUdUUdUUdUUdUU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 19 leading acc+def bytes ------ + + +dddddddddddddddddddUUdUUdUUdUUdU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 20 leading acc+def bytes ------ + + +ddddddddddddddddddddUUdUUdUUdUUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 21 leading acc+def bytes ------ + + +dddddddddddddddddddddUUdUUdUUdUU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 22 leading acc+def bytes ------ + + +ddddddddddddddddddddddUUdUUdUUdU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 23 leading acc+def bytes ------ + + +dddddddddddddddddddddddUUdUUdUUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 24 leading acc+def bytes ------ + + +ddddddddddddddddddddddddUUdUUdUU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 25 leading acc+def bytes ------ + + +dddddddddddddddddddddddddUUdUUdU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 26 leading acc+def bytes ------ + + +ddddddddddddddddddddddddddUUdUUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 27 leading acc+def bytes ------ + + +dddddddddddddddddddddddddddUUdUU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 28 leading acc+def bytes ------ + + +ddddddddddddddddddddddddddddUUdU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 29 leading acc+def bytes ------ + + +dddddddddddddddddddddddddddddUUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 30 leading acc+def bytes ------ + + +ddddddddddddddddddddddddddddddUU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Aligned case with 31 leading acc+def bytes ------ + + +dddddddddddddddddddddddddddddddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 0 leading acc+def bytes ------ + +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:...) + ... + + +dUddUddUddUddUddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 1 leading acc+def bytes ------ + +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:...) + ... + + +ddUddUddUddUddUddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 2 leading acc+def bytes ------ + +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:...) + ... + + +dddUddUddUddUddUddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 3 leading acc+def bytes ------ + +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:...) + ... + + +ddddUddUddUddUddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 4 leading acc+def bytes ------ + +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:...) + ... + + +dddddUddUddUddUddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 5 leading acc+def bytes ------ + +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:...) + ... + + +ddddddUddUddUddUddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 6 leading acc+def bytes ------ + +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:...) + ... + + +dddddddUddUddUddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 7 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddUddUddUddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 8 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddUddUddUddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 9 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddUddUddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 10 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddUddUddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 11 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddUddUddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 12 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddUddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 13 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddUddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 14 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddUddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 15 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddUddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 16 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddUddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 17 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddddUddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 18 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddUddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 19 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddddddUddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 20 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddddUddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 21 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddddddddUddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 22 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddddddUddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 23 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddddddddddUddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 24 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddddddddUddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 25 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddddddddddddUddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 26 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddddddddddUddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 27 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddddddddddddddUddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 28 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddddddddddddUdd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 29 leading acc+def bytes ------ + +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:...) + ... + + +ddddddddddddddddddddddddddddddUd + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 30 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddddddddddddddU + +Conditional jump or move depends on uninitialised value(s) + ... + + +------ PL Unaligned case with 31 leading acc+def bytes ------ + +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:...) + ... + + +dddddddddddddddddddddddddddddddd + + + +HEAP SUMMARY: + in use at exit: 0 bytes in 0 blocks + total heap usage: 65 allocs, 65 frees, 84,096 bytes allocated + +For a detailed leak analysis, rerun with: --leak-check=full + +For counts of detected and suppressed errors, rerun with: -v +Use --track-origins=yes to see where uninitialised values come from +ERROR SUMMARY: 99 errors from 99 contexts (suppressed: 0 from 0) diff --git a/memcheck/tests/amd64/sh-mem-vec256-plo-yes.stdout.exp b/memcheck/tests/amd64/sh-mem-vec256-plo-yes.stdout.exp new file mode 100644 index 0000000000..e69de29bb2 diff --git a/memcheck/tests/amd64/sh-mem-vec256-plo-yes.vgtest b/memcheck/tests/amd64/sh-mem-vec256-plo-yes.vgtest new file mode 100644 index 0000000000..ca32d1ed89 --- /dev/null +++ b/memcheck/tests/amd64/sh-mem-vec256-plo-yes.vgtest @@ -0,0 +1,4 @@ +prog: sh-mem-vec256 +prereq: ../../../tests/x86_amd64_features amd64-avx +args: -q +vgopts: --partial-loads-ok=yes diff --git a/memcheck/tests/amd64/sh-mem-vec256.c b/memcheck/tests/amd64/sh-mem-vec256.c new file mode 100644 index 0000000000..5a28e15791 --- /dev/null +++ b/memcheck/tests/amd64/sh-mem-vec256.c @@ -0,0 +1,21 @@ + +// Set up the 256-bit shadow memory test, by defining the +// required vector-copy function, and then including the +// template. + +#define VECTOR_BYTES 32 + +static __attribute__((noinline)) +void vector_copy ( void* dst, void* src ) +{ + /* Note: Verions of GCC through 4.8.1 do not allow "ymm7" in the + clobber list. (See http://stackoverflow.com/a/15767111/768469). + Simulate it with "xmm7". */ + __asm__ __volatile__( + "vmovupd (%1), %%ymm7 ; vmovupd %%ymm7, (%0)" + : /*OUT*/ : /*IN*/ "r"(dst), "r"(src) : "memory","xmm7" + ); +} + +// Include the test body, which refers to the above function +#include "../common/sh-mem-vec128.tmpl.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 7c85e8ea6c..1cf415d501 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 @@ -29,12 +29,14 @@ 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:...) ... 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:...) ... @@ -46,12 +48,14 @@ 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:...) ... 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:...) ... @@ -61,6 +65,7 @@ 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:...) ... @@ -76,6 +81,7 @@ 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:...) ... @@ -91,6 +97,7 @@ 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:...) ... @@ -106,6 +113,7 @@ 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:...) ... @@ -121,6 +129,7 @@ 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:...) ... @@ -136,6 +145,7 @@ 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:...) ... @@ -151,6 +161,7 @@ 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:...) ... @@ -166,6 +177,7 @@ 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:...) ... @@ -181,6 +193,7 @@ 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:...) ... @@ -196,6 +209,7 @@ 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:...) ... @@ -211,6 +225,7 @@ 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:...) ... @@ -226,6 +241,7 @@ 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:...) ... @@ -241,6 +257,7 @@ 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:...) ... @@ -256,6 +273,7 @@ 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:...) ... @@ -271,6 +289,7 @@ 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:...) ... @@ -286,6 +305,7 @@ 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:...) ... @@ -298,6 +318,7 @@ 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:...) ... @@ -313,6 +334,7 @@ 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:...) ... @@ -328,6 +350,7 @@ 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:...) ... @@ -343,6 +366,7 @@ 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:...) ... @@ -358,6 +382,7 @@ 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:...) ... @@ -373,6 +398,7 @@ 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:...) ... @@ -388,6 +414,7 @@ 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:...) ... @@ -403,6 +430,7 @@ 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:...) ... @@ -418,6 +446,7 @@ 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:...) ... @@ -433,6 +462,7 @@ 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:...) ... @@ -448,6 +478,7 @@ 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:...) ... @@ -463,6 +494,7 @@ 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:...) ... @@ -478,6 +510,7 @@ 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:...) ... @@ -493,6 +526,7 @@ 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:...) ... @@ -508,6 +542,7 @@ 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:...) ... @@ -523,6 +558,7 @@ 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:...) ... 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 8cefd389cf..c81db9b377 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 @@ -29,12 +29,14 @@ 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:...) ... 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:...) ... @@ -46,12 +48,14 @@ 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:...) ... 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:...) ... @@ -61,6 +65,7 @@ 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:...) ... @@ -76,6 +81,7 @@ 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:...) ... @@ -91,6 +97,7 @@ 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:...) ... @@ -106,6 +113,7 @@ 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:...) ... @@ -121,6 +129,7 @@ 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:...) ... @@ -136,6 +145,7 @@ 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:...) ... @@ -151,6 +161,7 @@ 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:...) ... @@ -166,6 +177,7 @@ 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:...) ... @@ -181,6 +193,7 @@ 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:...) ... @@ -196,6 +209,7 @@ 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:...) ... @@ -211,6 +225,7 @@ 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:...) ... @@ -226,6 +241,7 @@ 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:...) ... @@ -241,6 +257,7 @@ 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:...) ... @@ -256,6 +273,7 @@ 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:...) ... @@ -271,6 +289,7 @@ 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:...) ... @@ -286,6 +305,7 @@ 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:...) ... @@ -298,6 +318,7 @@ 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:...) ... @@ -313,6 +334,7 @@ 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:...) ... @@ -328,6 +350,7 @@ 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:...) ... @@ -343,6 +366,7 @@ 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:...) ... @@ -358,6 +382,7 @@ 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:...) ... @@ -373,6 +398,7 @@ 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:...) ... @@ -388,6 +414,7 @@ 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:...) ... @@ -403,6 +430,7 @@ 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:...) ... @@ -418,6 +446,7 @@ 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:...) ... @@ -433,6 +462,7 @@ 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:...) ... @@ -448,6 +478,7 @@ 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:...) ... @@ -463,6 +494,7 @@ 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:...) ... @@ -478,6 +510,7 @@ 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:...) ... @@ -493,6 +526,7 @@ 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:...) ... @@ -508,6 +542,7 @@ 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:...) ... @@ -523,6 +558,7 @@ 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:...) ... 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 d65328981f..099af00055 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 @@ -29,12 +29,14 @@ 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:...) ... 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:...) ... @@ -46,12 +48,14 @@ 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:...) ... 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:...) ... @@ -205,6 +209,7 @@ 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:...) ... @@ -220,6 +225,7 @@ 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:...) ... @@ -235,6 +241,7 @@ 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:...) ... @@ -250,6 +257,7 @@ 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:...) ... @@ -265,6 +273,7 @@ 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:...) ... @@ -280,6 +289,7 @@ 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:...) ... @@ -295,6 +305,7 @@ 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:...) ... @@ -310,6 +321,7 @@ 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:...) ... @@ -325,6 +337,7 @@ 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:...) ... @@ -340,6 +353,7 @@ 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:...) ... @@ -355,6 +369,7 @@ 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:...) ... @@ -370,6 +385,7 @@ 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:...) ... @@ -385,6 +401,7 @@ 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:...) ... @@ -400,6 +417,7 @@ 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:...) ... @@ -415,6 +433,7 @@ 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:...) ... @@ -430,6 +449,7 @@ 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:...) ... 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 ea2fceebff..e95bebc234 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 @@ -29,12 +29,14 @@ 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:...) ... 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:...) ... @@ -46,12 +48,14 @@ 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:...) ... 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:...) ... @@ -205,6 +209,7 @@ 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:...) ... @@ -220,6 +225,7 @@ 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:...) ... @@ -235,6 +241,7 @@ 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:...) ... @@ -250,6 +257,7 @@ 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:...) ... @@ -265,6 +273,7 @@ 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:...) ... @@ -280,6 +289,7 @@ 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:...) ... @@ -295,6 +305,7 @@ 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:...) ... @@ -310,6 +321,7 @@ 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:...) ... @@ -325,6 +337,7 @@ 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:...) ... @@ -340,6 +353,7 @@ 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:...) ... @@ -355,6 +369,7 @@ 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:...) ... @@ -370,6 +385,7 @@ 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:...) ... @@ -385,6 +401,7 @@ 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:...) ... @@ -400,6 +417,7 @@ 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:...) ... @@ -415,6 +433,7 @@ 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:...) ... @@ -430,6 +449,7 @@ 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:...) ... diff --git a/memcheck/tests/common/sh-mem-vec128.tmpl.c b/memcheck/tests/common/sh-mem-vec128.tmpl.c index c2f3dd0132..16ad437936 100644 --- a/memcheck/tests/common/sh-mem-vec128.tmpl.c +++ b/memcheck/tests/common/sh-mem-vec128.tmpl.c @@ -1,6 +1,11 @@ -// Tests shadow memory correctness for 16-byte vector loads/stores -// Requires vector16_copy() to be specified somehow. +// Tests shadow memory correctness for 16-byte/32-byte/etc. vector +// loads/stores. Requires vector_copy() and VECTOR_BYTES to be +// specified somehow. + +#ifndef VECTOR_BYTES +#error "VECTOR_BYTES must be defined" +#endif #include #include @@ -10,7 +15,7 @@ #include "memcheck/memcheck.h" // What we're actually testing -// .. is vector16_copy, which should be defined before this point +// .. is vector_copy, which should be defined before this point // All the sizes here are in *bytes*, not bits. @@ -134,9 +139,9 @@ static void apply ( void(*fn)(U4,Bool), U4 arg1, Bool arg2 ) // Try doing some partial-loads-ok/not-ok testing. /* Test cases: - - load, 16-aligned, all no-access + - load, aligned, all no-access ==> addr err - - load, 16-aligned, 1 to 15 initial bytes accessible, + - load, aligned, 1 to VECTOR_BYTES-1 initial bytes accessible, then at least one unaccessible byte, then remaining bytes in any state. ==> if PLO then no error, but returned V bits are undefined @@ -144,7 +149,7 @@ static void apply ( void(*fn)(U4,Bool), U4 arg1, Bool arg2 ) else error; and V bits are defined for unaccessible bytes - All of the above, but non-16-aligned: + All of the above, but non-aligned: -- all return an addressing error */ @@ -154,7 +159,10 @@ static void do_partial_load_case ( U4 nInitialValid, Bool aligned ) "------ PL %s case with %u leading acc+def bytes ------\n\n", aligned ? "Aligned" : "Unaligned", nInitialValid); - U1* block = memalign16(64); + void *temp; + if (posix_memalign(&temp, VECTOR_BYTES, 64) != 0) + abort(); + U1* block = temp; U4 j; for (j = 0; j < 64; j++) block[j] = 0; @@ -162,10 +170,10 @@ static void do_partial_load_case ( U4 nInitialValid, Bool aligned ) // Make the block have this pattern: // block[0 .. i-1] accessible and defined - // block[i .. 15] repeating NOACCESS, UNDEF, DEF + // block[i .. VECTOR_BYTES-1] repeating NOACCESS, UNDEF, DEF // hence block[i], at the very least, is always NOACCESS U4 i = nInitialValid; - for (j = i; j < 16; j++) { + for (j = i; j < VECTOR_BYTES; j++) { switch ((j-i) % 3) { case 0: make_noaccess(&block[j]); break; case 1: block[j] = make_undef(block[j]); break; @@ -175,15 +183,15 @@ static void do_partial_load_case ( U4 nInitialValid, Bool aligned ) // Do the access, possibly generating an error, and show the // resulting V bits - U1 dst[16]; - vector16_copy(&dst[0], block); + U1 dst[VECTOR_BYTES]; + vector_copy(&dst[0], block); - U1 dst_vbits[16]; - U4 r = VALGRIND_GET_VBITS(&dst[0], &dst_vbits[0], 16); + U1 dst_vbits[VECTOR_BYTES]; + U4 r = VALGRIND_GET_VBITS(&dst[0], &dst_vbits[0], VECTOR_BYTES); assert(r == 1 || r == 0); fprintf(stderr, "\n"); - for (j = 0; j < 16; j++) { + for (j = 0; j < VECTOR_BYTES; j++) { fprintf(stderr, "%c", dst_vbits[j] == 0 ? 'd' : dst_vbits[j] == 0xFF ? 'U' : '?'); } @@ -192,7 +200,7 @@ static void do_partial_load_case ( U4 nInitialValid, Bool aligned ) // Also let's use the resulting value, to check we get an undef // error U1 sum = 0; - for (j = 0; j < 16; j++) + for (j = 0; j < VECTOR_BYTES; j++) sum ^= dst[j]; if (sum == 42) { @@ -209,11 +217,14 @@ static void do_partial_load_case ( U4 nInitialValid, Bool aligned ) int main ( void ) { - fprintf(stderr, "sh-mem-vec128: config: %s-endian, %d-bit word size\n", - get_endianness(), (int)(8 * sizeof(void*))); + fprintf(stderr, "sh-mem-vec%d: config: %s-endian, %d-bit word size\n", + VECTOR_BYTES * 8, get_endianness(), (int)(8 * sizeof(void*))); U4 i; - U1* buf = memalign16(N_BYTES); + void *temp; + if (posix_memalign(&temp, VECTOR_BYTES, N_BYTES) != 0) + abort(); + U1* buf = temp; // Fill |buf| with bytes, so that zero bits have a zero shadow // (are defined) and one bits have a one shadow (are undefined) @@ -234,21 +245,21 @@ int main ( void ) U4 n_fails = 0; for (i = 0; i < n_copies; i++) { - U4 si = randomU4() % (N_BYTES-16); - U4 di = randomU4() % (N_BYTES-16); - if (0 == (randomU1() & 7)) si &= ~(16-1); - if (0 == (randomU1() & 7)) di &= ~(16-1); - if (0 == (randomU1() & 63)) { di &= ~(16-1); si &= ~(16-1); } + U4 si = randomU4() % (N_BYTES-VECTOR_BYTES); + U4 di = randomU4() % (N_BYTES-VECTOR_BYTES); + if (0 == (randomU1() & 7)) si &= ~(VECTOR_BYTES-1); + if (0 == (randomU1() & 7)) di &= ~(VECTOR_BYTES-1); + if (0 == (randomU1() & 63)) { di &= ~(VECTOR_BYTES-1); si &= ~(VECTOR_BYTES-1); } void* dst = &buf[di]; void* src = &buf[si]; - if (0 == (((UWord)src) & (16-1))) n_s_aligned++; - if (0 == (((UWord)dst) & (16-1))) n_d_aligned++; - if (0 == (((UWord)src) & (16-1)) && 0 == (((UWord)dst) & (16-1))) + if (0 == (((UWord)src) & (VECTOR_BYTES-1))) n_s_aligned++; + if (0 == (((UWord)dst) & (VECTOR_BYTES-1))) n_d_aligned++; + if (0 == (((UWord)src) & (VECTOR_BYTES-1)) && 0 == (((UWord)dst) & (VECTOR_BYTES-1))) n_both_aligned++; - vector16_copy(dst, src); + vector_copy(dst, src); } U4 freq[256]; @@ -280,31 +291,30 @@ int main ( void ) // Check that we can detect underruns of the block. fprintf(stderr, "\nExpect 2 x no error\n" ); - vector16_copy( &buf[100], &buf[0] ); - vector16_copy( &buf[0], &buf[100] ); + vector_copy( &buf[100], &buf[0] ); + vector_copy( &buf[0], &buf[100] ); fprintf(stderr, "\nExpect 2 x error\n\n" ); - vector16_copy( &buf[100], &buf[-1] ); // invalid rd - vector16_copy( &buf[-1], &buf[100] ); // invalid wr + vector_copy( &buf[100], &buf[-1] ); // invalid rd + vector_copy( &buf[-1], &buf[100] ); // invalid wr // and overruns .. fprintf(stderr, "\nExpect 2 x no error\n" ); - vector16_copy( &buf[200], &buf[N_BYTES-16 + 0] ); - vector16_copy( &buf[N_BYTES-16 + 0], &buf[200] ); + vector_copy( &buf[200], &buf[N_BYTES-VECTOR_BYTES + 0] ); + vector_copy( &buf[N_BYTES-VECTOR_BYTES + 0], &buf[200] ); fprintf(stderr, "\nExpect 2 x error\n\n" ); - vector16_copy( &buf[200], &buf[N_BYTES-16 + 1] ); - vector16_copy( &buf[N_BYTES-16 + 1], &buf[200] ); + vector_copy( &buf[200], &buf[N_BYTES-VECTOR_BYTES + 1] ); + vector_copy( &buf[N_BYTES-VECTOR_BYTES + 1], &buf[200] ); free(buf); fprintf(stderr, "\n"); - for (i = 0; i < 16; i++) + for (i = 0; i < VECTOR_BYTES; i++) apply( do_partial_load_case, i, True/*aligned*/ ); - for (i = 0; i < 16; i++) + for (i = 0; i < VECTOR_BYTES; i++) apply( do_partial_load_case, i, False/*not aligned*/ ); return 0; } - diff --git a/memcheck/tests/x86/sh-mem-vec128.c b/memcheck/tests/x86/sh-mem-vec128.c index a5d0a1db81..29b7137855 100644 --- a/memcheck/tests/x86/sh-mem-vec128.c +++ b/memcheck/tests/x86/sh-mem-vec128.c @@ -3,12 +3,14 @@ // required vector-copy function, and then including the // template. +#define VECTOR_BYTES 16 + static __attribute__((noinline)) -void vector16_copy ( void* dst, void* src ) +void vector_copy ( void* dst, void* src ) { __asm__ __volatile__( "movups (%1), %%xmm7 ; movups %%xmm7, (%0)" - : /*OUT*/ : /*IN*/ "r"(dst), "r"(src) : "memory","xmm7" + : /*OUT*/ : /*IN*/ "r"(dst), "r"(src) : "memory","xmm7" ); }