where XXXXXX is the bug number as listed below.
197914 Building valgrind from svn now requires automake-1.10
+203877 increase to 16Mb maximum allowed alignment for memalign() and posix_memalign
219156 Valgrind does not handle statically linked malloc or other malloc lib (e.g. tcmalloc)
247386 make perf does not run all performance tests
270006 Valgrind scheduler unfair
n-i-bz Add missing gdbserver xml files for shadow registers for ppc32
n-i-bz Fix false positive in sys_clone on amd64 when optional args are not given (e.g. child_tidptr)
n-i-bz Fix assert in gdbserver for watchpoints watching the same address
+301229 dup of 203877, see above.
Release 3.7.0 (5 November 2011)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// this allocation; it isn't optional.
vg_assert(cc);
+ // Check that the requested alignment has a plausible size.
// Check that the requested alignment seems reasonable; that is, is
// a power of 2.
if (req_alignB < VG_MIN_MALLOC_SZB
- || req_alignB > 1048576
+ || req_alignB > 16 * 1024 * 1024
|| VG_(log2)( req_alignB ) == -1 /* not a power of 2 */) {
VG_(printf)("VG_(arena_memalign)(%p, %lu, %lu)\n"
"bad alignment value %lu\n"
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);
# define PM(a,b,c) posix_memalign((void**)a, b, c)
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, 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, 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;