|
From: John C. <joh...@ta...> - 2006-06-21 03:55:57
|
Valgrind is balking at perform a large brk() move.
So I wrote a very simple program to try every value from large to none
and find the point at which it first succeeds.
I think the results are quite instructive (assertion failure) and will
pinpoint the bug....
Here is the program....
==brk.c===============================================================
#include <unistd.h>
#include <stdio.h>
int main()
{
void * current_brk = sbrk(0);
int n = 1;
int result;
printf("Current brk = %p\n", current_brk);
for( n=0xa00000;n>0;--n) {
result = brk(current_brk+n);
if( !result) {
printf( "brk first succeeded at size %d (or %x in hex)\n", n, n);
return 0;
}
}
return 0;
}
======================================================================
It compiles without warnings under -Wall -W under gcc 4.1.0
Running normally not under valgrind the output is...
Current brk = 0x804a000
brk first succeeded at size 10485760 (or a00000 in hex)
Running under valgrind (svn latest as of today....)
======================================================================
valgrind -v -d ./brk
--26015:1:debuglog DebugLog system started by Stage 1, level 1 logging requested
--26015:1:launcher no tool requested, defaulting to 'memcheck'
--26015:1:launcher selected platform 'x86-linux'
--26015:1:launcher launching /usr/local/lib/valgrind/x86-linux/memcheck
--26015:1:debuglog DebugLog system started by Stage 2 (main), level 1 logging requested
--26015:1:main Welcome to Valgrind version 3.3.0.SVN debug logging
--26015:1:main Checking current stack is plausible
--26015:1:main Checking initial stack was noted
--26015:1:main Starting the address space manager
--26015:1:main Address space manager is running
--26015:1:main Starting the dynamic memory manager
--26015:1:mallocfr newSuperblock at 0x61EBE000 (pszB 1048560) owner VALGRIND/tool
--26015:1:main Dynamic memory manager is running
--26015:1:main Getting stage1's name
--26015:1:main Get hardware capabilities ...
--26015:1:main ... arch = X86, hwcaps = x86-sse1-sse2
--26015:1:main Split up command line
--26015:1:main Preprocess command line opts
--26015:1:main Loading client
--26015:1:main Setup client env
--26015:1:main Setup client stack
--26015:1:main Setup client data (brk) segment
--26015:1:main Setup file descriptors
--26015:1:main Create fake /proc/<pid>/cmdline
--26015:1:main Initialise the tool part 1 (pre_clo_init)
--26015:1:main Print help and quit, if requested
--26015:1:main Process Valgrind's command line options, setup logging
--26015:1:mallocfr newSuperblock at 0x61FBE000 (pszB 1048560) owner VALGRIND/core
--26015:1:main Print the preamble...
==26015== Memcheck, a memory error detector.
==26015== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al.
==26015== Using LibVEX rev 1631, a library for dynamic binary translation.
==26015== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP.
==26015== Using valgrind-3.3.0.SVN, a dynamic binary instrumentation framework.
==26015== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al.
==26015==
--26015-- Command line
--26015-- ./brk
--26015-- Startup, with flags:
--26015-- -v
--26015-- -d
--26015-- Contents of /proc/version:
--26015-- Linux version 2.6.15.1 (johnc@parore) (gcc version 4.0.3 20060128 (prerelease) (Debian 4.0.2-8)) #0 PREEMPT Tue Mar 21 08:57:50 NZST 2006
--26015-- Arch and hwcaps: X86, x86-sse1-sse2
--26015-- Valgrind library directory: /usr/local/lib/valgrind
--26015:1:main ...finished the preamble
--26015:1:main Initialise the tool part 2 (post_clo_init)
--26015:1:main Initialise TT/TC
--26015:1:main Initialise redirects
--26015:1:mallocfr newSuperblock at 0x62139000 (pszB 1048560) owner VALGRIND/symtab
--26015:1:main Load initial debug info
--26015-- Reading syms from /lib/ld-2.3.6.so (0x4000000)
--26015-- Reading debug info from /lib/ld-2.3.6.so...
--26015-- ... CRC mismatch (computed A0828FFB wanted BF5D33FD)
--26015-- object doesn't have a symbol table
--26015-- Reading syms from /home/johnc/tmp/brk (0x8048000)
--26015-- Reading syms from /usr/local/lib/valgrind/x86-linux/memcheck (0x38000000)
--26015-- object doesn't have a dynamic symbol table
--26015:1:mallocfr newSuperblock at 0x62239000 (pszB 1048560) owner VALGRIND/symtab
--26015:1:mallocfr newSuperblock at 0x62339000 (pszB 1048560) owner VALGRIND/symtab
--26015:1:redir transfer ownership V -> C of 0x38027000 .. 0x38027FFF
--26015:1:main Tell tool about initial permissions
--26015:1:main Initialise scheduler
--26015:1:main Initialise thread 1's state
--26015:1:main Initialise signal management
--26015:1:main Load suppressions
--26015-- Reading suppressions file: /usr/local/lib/valgrind/default.supp
--26015:1:main
--26015:1:main
--26015:1:aspacem <<< SHOW_SEGMENTS: Memory layout at client startup (25 segments, 3 segnames)
--26015:1:aspacem ( 0) /usr/local/lib/valgrind/x86-linux/memcheck
--26015:1:aspacem ( 1) /home/johnc/tmp/brk
--26015:1:aspacem ( 2) /lib/ld-2.3.6.so
--26015:1:aspacem 0: RSVN 0000000000-0003FFFFFF 64m ----- SmFixed
--26015:1:aspacem 1: file 0004000000-0004014FFF 86016 r-x-- d=0x302 i=213532 o=0 (2)
--26015:1:aspacem 2: file 0004015000-0004016FFF 8192 rw--- d=0x302 i=213532 o=86016 (2)
--26015:1:aspacem 3: 0004017000-0008047FFF 64m
--26015:1:aspacem 4: file 0008048000-0008048FFF 4096 r-x-- d=0x304 i=105621 o=0 (1)
--26015:1:aspacem 5: file 0008049000-0008049FFF 4096 rw--- d=0x304 i=105621 o=0 (1)
--26015:1:aspacem 6: anon 000804A000-000804AFFF 4096 rwx--
--26015:1:aspacem 7: RSVN 000804B000-0008849FFF 8384512 ----- SmLower
--26015:1:aspacem 8: 000884A000-0037FFFFFF 759m
--26015:1:aspacem 9: FILE 0038000000-0038026FFF 159744 r-x-- d=0x302 i=574341 o=0 (0)
--26015:1:aspacem 10: file 0038027000-0038027FFF 4096 r-x-- d=0x302 i=574341 o=159744 (0)
--26015:1:aspacem 11: FILE 0038028000-0038151FFF 1220608 r-x-- d=0x302 i=574341 o=163840 (0)
--26015:1:aspacem 12: FILE 0038152000-0038152FFF 4096 rw--- d=0x302 i=574341 o=1380352 (0)
--26015:1:aspacem 13: ANON 0038153000-003883CFFF 7249920 rw---
--26015:1:aspacem 14: 003883D000-0061EBCFFF 662m
--26015:1:aspacem 15: RSVN 0061EBD000-0061EBDFFF 4096 ----- SmFixed
--26015:1:aspacem 16: ANON 0061EBE000-0062448FFF 5812224 rwx--
--26015:1:aspacem 17: 0062449000-00BE579FFF 1473m
--26015:1:aspacem 18: RSVN 00BE57A000-00BED78FFF 8384512 ----- SmUpper
--26015:1:aspacem 19: anon 00BED79000-00BED79FFF 4096 rwx--
--26015:1:aspacem 20: 00BED7A000-00BFD66FFF 15m
--26015:1:aspacem 21: ANON 00BFD67000-00BFD7CFFF 90112 rw---
--26015:1:aspacem 22: RSVN 00BFD7D000-00FFFFDFFF 1026m ----- SmFixed
--26015:1:aspacem 23: ANON 00FFFFE000-00FFFFEFFF 4096 -----
--26015:1:aspacem 24: RSVN 00FFFFF000-00FFFFFFFF 4096 ----- SmFixed
--26015:1:aspacem >>>
--26015:1:main
--26015:1:main
--26015:1:main Running thread 1
--26015:1:syswrap- entering VG_(main_thread_wrapper_NORETURN)
--26015:1:aspacem allocated thread stack at 0x62449000 size 81920
--26015:1:syswrap- run_a_thread_NORETURN(tid=1): pre-thread_wrapper
--26015:1:syswrap- thread_wrapper(tid=1): entry
--26015:1:transtab allocate sector 0
--26015:1:mallocfr newSuperblock at 0x63C4F000 (pszB 65520) owner VALGRIND/ttaux
--26015:1:signals extending a stack base 0xBED79000 down by 4096
--26015-- Reading syms from /usr/local/lib/valgrind/x86-linux/vgpreload_core.so (0x4019000)
--26015-- Reading syms from /usr/local/lib/valgrind/x86-linux/vgpreload_memcheck.so (0x401B000)
--26015-- Reading syms from /lib/tls/i686/cmov/libc-2.3.6.so (0x403F000)
--26015-- Reading debug info from /lib/tls/i686/cmov/libc-2.3.6.so...
--26015-- ... CRC mismatch (computed 1C5E30FA wanted 551808F8)
--26015-- object doesn't have a symbol table
--26015:1:mallocfr newSuperblock at 0x63C67000 (pszB 262128) owner VALGRIND/exectxt
--26015:1:mallocfr newSuperblock at 0x63CA7000 (pszB 65520) owner VALGRIND/errors
--26015-- REDIR: 0x40AD090 (rindex) redirected to 0x401DF20 (rindex)
valgrind: m_syswrap/syswrap-generic.c:999 (do_brk): Assertion 'newbrkP > rseg->start && newbrkP < rseg->end+1 - VKI_PAGE_SIZE' failed.
==26015== at 0x38016587: report_and_quit (m_libcassert.c:136)
==26015== by 0x380168B3: vgPlain_assert_fail (m_libcassert.c:200)
==26015== by 0x38043E65: vgSysWrap_generic_sys_brk_before (syswrap-generic.c:999)
==26015== by 0x3804B4EE: vgPlain_client_syscall (syswrap-main.c:719)
==26015== by 0x38037CF3: vgPlain_scheduler (scheduler.c:721)
==26015== by 0x38056AC2: run_a_thread_NORETURN (syswrap-linux.c:87)
sched status:
running_tid=1
Thread 1: status = VgTs_Runnable
==26015== at 0x4000792: (within /lib/ld-2.3.6.so)
==26015== by 0x804842C: main (in /home/johnc/tmp/brk)
Note: see also the FAQ.txt in the source distribution.
It contains workarounds to several common problems.
If that doesn't help, please report this bug to: www.valgrind.org
In the bug report, send all the above text, the valgrind
version, and what Linux distro you are using. Thanks.
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : joh...@ta...
New Zealand
Carter's Clarification of Murphy's Law.
"Things only ever go right so that they may go more spectacularly wrong later."
>From this principle, all of life and physics may be deduced.
|
|
From: Tom H. <to...@co...> - 2006-06-21 07:37:11
|
In message <Pine.LNX.4.64.0606211441360.18087@parore>
John Carter <joh...@ta...> wrote:
> Valgrind is balking at perform a large brk() move.
>
> So I wrote a very simple program to try every value from large to none
> and find the point at which it first succeeds.
>
> I think the results are quite instructive (assertion failure) and will
> pinpoint the bug....
Indeed, and I can reproduce it. Can you raise a bug on the bug
tracker for it please?
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: Tom H. <to...@co...> - 2006-06-21 08:03:03
|
In message <Pine.LNX.4.64.0606211441360.18087@parore>
John Carter <joh...@ta...> wrote:
> Valgrind is balking at perform a large brk() move.
>
> So I wrote a very simple program to try every value from large to none
> and find the point at which it first succeeds.
>
> I think the results are quite instructive (assertion failure) and will
> pinpoint the bug....
I've checked in a fix for this now - it was an off by one error in
the boundary condition being checked by the assertion which would
cause it to fire when you tried to expand into the final page of the
space reserved for the heap.
It turned out that we were also allowing the heap to grow by one
less byte than we should have been so I've fixed that as well.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: John C. <joh...@ta...> - 2006-06-22 00:03:29
|
On Wed, 21 Jun 2006, Tom Hughes wrote: > I've checked in a fix for this now - it was an off by one error in > the boundary condition being checked by the assertion which would > cause it to fire when you tried to expand into the final page of the > space reserved for the heap. Thanks! That's marvelous! I checked it out and it worked, assertion gone away! Do you still want me to enter it into bug tracker? I notice that it valgrind still refuses to shift the brk by more than about 8mb (0x7ff001 to be precise) Is there a way of increasing that limit? (I have appended the output of valgrind -v -d ./brk to this mail.... John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : joh...@ta... New Zealand Carter's Clarification of Murphy's Law. "Things only ever go right so that they may go more spectacularly wrong later." >From this principle, all of life and physics may be deduced. ====================================================================== valgrind -v -d ./brk --8182:1:debuglog DebugLog system started by Stage 1, level 1 logging requested --8182:1:launcher no tool requested, defaulting to 'memcheck' --8182:1:launcher selected platform 'x86-linux' --8182:1:launcher launching /usr/local/lib/valgrind/x86-linux/memcheck --8182:1:debuglog DebugLog system started by Stage 2 (main), level 1 logging requested --8182:1:main Welcome to Valgrind version 3.3.0.SVN debug logging --8182:1:main Checking current stack is plausible --8182:1:main Checking initial stack was noted --8182:1:main Starting the address space manager --8182:1:main Address space manager is running --8182:1:main Starting the dynamic memory manager --8182:1:mallocfr newSuperblock at 0x61F7F000 (pszB 1048560) owner VALGRIND/tool --8182:1:main Dynamic memory manager is running --8182:1:main Getting stage1's name --8182:1:main Get hardware capabilities ... --8182:1:main ... arch = X86, hwcaps = x86-sse1-sse2 --8182:1:main Split up command line --8182:1:main Preprocess command line opts --8182:1:main Loading client --8182:1:main Setup client env --8182:1:main Setup client stack --8182:1:main Setup client data (brk) segment --8182:1:main Setup file descriptors --8182:1:main Create fake /proc/<pid>/cmdline --8182:1:main Initialise the tool part 1 (pre_clo_init) --8182:1:main Print help and quit, if requested --8182:1:main Process Valgrind's command line options, setup logging --8182:1:mallocfr newSuperblock at 0x6207F000 (pszB 1048560) owner VALGRIND/core --8182:1:main Print the preamble... ==8182== Memcheck, a memory error detector. ==8182== Copyright (C) 2002-2006, and GNU GPL'd, by Julian Seward et al. ==8182== Using LibVEX rev 1631, a library for dynamic binary translation. ==8182== Copyright (C) 2004-2006, and GNU GPL'd, by OpenWorks LLP. ==8182== Using valgrind-3.3.0.SVN, a dynamic binary instrumentation framework. ==8182== Copyright (C) 2000-2006, and GNU GPL'd, by Julian Seward et al. ==8182== --8182-- Command line --8182-- ./brk --8182-- Startup, with flags: --8182-- -v --8182-- -d --8182-- Contents of /proc/version: --8182-- Linux version 2.6.15.1 (johnc@parore) (gcc version 4.0.3 20060128 (prerelease) (Debian 4.0.2-8)) #0 PREEMPT Tue Mar 21 08:57:50 NZST 2006 --8182-- Arch and hwcaps: X86, x86-sse1-sse2 --8182-- Valgrind library directory: /usr/local/lib/valgrind --8182:1:main ...finished the preamble --8182:1:main Initialise the tool part 2 (post_clo_init) --8182:1:main Initialise TT/TC --8182:1:main Initialise redirects --8182:1:mallocfr newSuperblock at 0x621FA000 (pszB 1048560) owner VALGRIND/symtab --8182:1:main Load initial debug info --8182-- Reading syms from /lib/ld-2.3.6.so (0x4000000) --8182-- Reading debug info from /lib/ld-2.3.6.so... --8182-- ... CRC mismatch (computed A0828FFB wanted BF5D33FD) --8182-- object doesn't have a symbol table --8182-- Reading syms from /home/johnc/tmp/brk (0x8048000) --8182-- Reading syms from /usr/local/lib/valgrind/x86-linux/memcheck (0x38000000) --8182-- object doesn't have a dynamic symbol table --8182:1:mallocfr newSuperblock at 0x622FA000 (pszB 1048560) owner VALGRIND/symtab --8182:1:mallocfr newSuperblock at 0x623FA000 (pszB 1048560) owner VALGRIND/symtab --8182:1:redir transfer ownership V -> C of 0x38027000 .. 0x38027FFF --8182:1:main Tell tool about initial permissions --8182:1:main Initialise scheduler --8182:1:main Initialise thread 1's state --8182:1:main Initialise signal management --8182:1:main Load suppressions --8182-- Reading suppressions file: /usr/local/lib/valgrind/default.supp --8182:1:main --8182:1:main --8182:1:aspacem <<< SHOW_SEGMENTS: Memory layout at client startup (25 segments, 3 segnames) --8182:1:aspacem ( 0) /usr/local/lib/valgrind/x86-linux/memcheck --8182:1:aspacem ( 1) /home/johnc/tmp/brk --8182:1:aspacem ( 2) /lib/ld-2.3.6.so --8182:1:aspacem 0: RSVN 0000000000-0003FFFFFF 64m ----- SmFixed --8182:1:aspacem 1: file 0004000000-0004014FFF 86016 r-x-- d=0x302 i=213532 o=0 (2) --8182:1:aspacem 2: file 0004015000-0004016FFF 8192 rw--- d=0x302 i=213532 o=86016 (2) --8182:1:aspacem 3: 0004017000-0008047FFF 64m --8182:1:aspacem 4: file 0008048000-0008048FFF 4096 r-x-- d=0x304 i=105621 o=0 (1) --8182:1:aspacem 5: file 0008049000-0008049FFF 4096 rw--- d=0x304 i=105621 o=0 (1) --8182:1:aspacem 6: anon 000804A000-000804AFFF 4096 rwx-- --8182:1:aspacem 7: RSVN 000804B000-0008849FFF 8384512 ----- SmLower --8182:1:aspacem 8: 000884A000-0037FFFFFF 759m --8182:1:aspacem 9: FILE 0038000000-0038026FFF 159744 r-x-- d=0x302 i=574341 o=0 (0) --8182:1:aspacem 10: file 0038027000-0038027FFF 4096 r-x-- d=0x302 i=574341 o=159744 (0) --8182:1:aspacem 11: FILE 0038028000-0038151FFF 1220608 r-x-- d=0x302 i=574341 o=163840 (0) --8182:1:aspacem 12: FILE 0038152000-0038152FFF 4096 rw--- d=0x302 i=574341 o=1380352 (0) --8182:1:aspacem 13: ANON 0038153000-003883CFFF 7249920 rw--- --8182:1:aspacem 14: 003883D000-0061F7DFFF 663m --8182:1:aspacem 15: RSVN 0061F7E000-0061F7EFFF 4096 ----- SmFixed --8182:1:aspacem 16: ANON 0061F7F000-0062509FFF 5812224 rwx-- --8182:1:aspacem 17: 006250A000-00BE6FCFFF 1473m --8182:1:aspacem 18: RSVN 00BE6FD000-00BEEFBFFF 8384512 ----- SmUpper --8182:1:aspacem 19: anon 00BEEFC000-00BEEFCFFF 4096 rwx-- --8182:1:aspacem 20: 00BEEFD000-00BFEE8FFF 15m --8182:1:aspacem 21: ANON 00BFEE9000-00BFEFEFFF 90112 rw--- --8182:1:aspacem 22: RSVN 00BFEFF000-00FFFFDFFF 1024m ----- SmFixed --8182:1:aspacem 23: ANON 00FFFFE000-00FFFFEFFF 4096 ----- --8182:1:aspacem 24: RSVN 00FFFFF000-00FFFFFFFF 4096 ----- SmFixed --8182:1:aspacem >>> --8182:1:main --8182:1:main --8182:1:main Running thread 1 --8182:1:syswrap- entering VG_(main_thread_wrapper_NORETURN) --8182:1:aspacem allocated thread stack at 0x6250A000 size 81920 --8182:1:syswrap- run_a_thread_NORETURN(tid=1): pre-thread_wrapper --8182:1:syswrap- thread_wrapper(tid=1): entry --8182:1:transtab allocate sector 0 --8182:1:mallocfr newSuperblock at 0x63D10000 (pszB 65520) owner VALGRIND/ttaux --8182:1:signals extending a stack base 0xBEEFC000 down by 4096 --8182-- Reading syms from /usr/local/lib/valgrind/x86-linux/vgpreload_core.so (0x4019000) --8182-- Reading syms from /usr/local/lib/valgrind/x86-linux/vgpreload_memcheck.so (0x401B000) --8182-- Reading syms from /lib/tls/i686/cmov/libc-2.3.6.so (0x403F000) --8182-- Reading debug info from /lib/tls/i686/cmov/libc-2.3.6.so... --8182-- ... CRC mismatch (computed 1C5E30FA wanted 551808F8) --8182-- object doesn't have a symbol table --8182:1:mallocfr newSuperblock at 0x63D28000 (pszB 262128) owner VALGRIND/exectxt --8182:1:mallocfr newSuperblock at 0x63D68000 (pszB 65520) owner VALGRIND/errors --8182-- REDIR: 0x40AD090 (rindex) redirected to 0x401DF20 (rindex) Current brk = 0x804a000 brk first failed at size 8384513 (or 7ff001 in hex) --8182:1:syswrap- thread_wrapper(tid=1): exit --8182:1:syswrap- run_a_thread_NORETURN(tid=1): post-thread_wrapper --8182:1:syswrap- run_a_thread_NORETURN(tid=1): last one standing --8182:1:main entering VG_(shutdown_actions_NORETURN) --8182-- REDIR: 0x40A5B40 (free) redirected to 0x401CEE9 (free) --8182-- REDIR: 0x40ADF40 (memset) redirected to 0x401E3C0 (memset) ==8182== ==8182== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 11 from 1) --8182-- --8182-- supp: 11 Ubuntu-stripped-ld.so ==8182== malloc/free: in use at exit: 0 bytes in 0 blocks. ==8182== malloc/free: 0 allocs, 0 frees, 0 bytes allocated. ==8182== ==8182== All heap blocks were freed -- no leaks are possible. --8182-- memcheck: sanity checks: 754 cheap, 31 expensive --8182-- memcheck: auxmaps: 0 auxmap entries (0k, 0M) in use --8182-- memcheck: auxmaps: 0 searches, 0 comparisons --8182-- memcheck: SMs: n_issued = 135 (2160k, 2M) --8182-- memcheck: SMs: n_deissued = 0 (0k, 0M) --8182-- memcheck: SMs: max_noaccess = 65535 (1048560k, 1023M) --8182-- memcheck: SMs: max_undefined = 0 (0k, 0M) --8182-- memcheck: SMs: max_defined = 21 (336k, 0M) --8182-- memcheck: SMs: max_non_DSM = 135 (2160k, 2M) --8182-- memcheck: max sec V bit nodes: 1 (0k, 0M) --8182-- memcheck: set_sec_vbits8 calls: 1 (new: 1, updates: 0) --8182-- memcheck: max shadow mem size: 2464k, 2M --8182-- translate: fast SP updates identified: 1,630 ( 90.1%) --8182-- translate: generic_known SP updates identified: 90 ( 4.9%) --8182-- translate: generic_unknown SP updates identified: 89 ( 4.9%) --8182-- tt/tc: 3,471 tt lookups requiring 3,498 probes --8182-- tt/tc: 3,471 fast-cache updates, 2 flushes --8182-- transtab: new 1,733 (36,167 -> 601,023; ratio 166:10) [0 scs] --8182-- transtab: dumped 0 (0 -> ??) --8182-- transtab: discarded 0 (0 -> ??) --8182-- scheduler: 75,486,374 jumps (bb entries). --8182-- scheduler: 754/8,386,964 major/minor sched events. --8182-- sanity: 755 cheap, 31 expensive checks. --8182-- exectx: 30,011 lists, 6 contexts (avg 0 per list) --8182-- exectx: 11 searches, 5 full compares (454 per 1000) --8182-- exectx: 0 cmp2, 26 cmp4, 0 cmpAll --8182:1:core_os VG_(terminate_NORETURN)(tid=1) |
|
From: Tom H. <to...@co...> - 2006-06-22 10:45:45
|
In message <Pine.LNX.4.64.0606221145130.7002@parore>
John Carter <joh...@ta...> wrote:
> On Wed, 21 Jun 2006, Tom Hughes wrote:
>
>> I've checked in a fix for this now - it was an off by one error in
>> the boundary condition being checked by the assertion which would
>> cause it to fire when you tried to expand into the final page of the
>> space reserved for the heap.
>
> Thanks! That's marvelous!
>
> I checked it out and it worked, assertion gone away!
>
> Do you still want me to enter it into bug tracker?
No, it's fine - I've put it in the bug status file so we should
remember to merge it is we do a 3.2.1 release.
> I notice that it valgrind still refuses to shift the brk by more than
> about 8mb (0x7ff001 to be precise)
Only by changing the source - line 2208-2218 of m_main.c are the ones
responsible for reserving space for the heap. By default valgrind
obeys the data limit subject to a minimum of 1Mb and a maximum of 8Mb.
The slight difference from 8Mb you see is down to valgrind reserving
a guard page at the end of the heap.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: John C. <joh...@ta...> - 2006-06-23 06:06:21
|
On Thu, 22 Jun 2006, Tom Hughes wrote: >> I notice that it valgrind still refuses to shift the brk by more than >> about 8mb (0x7ff001 to be precise) > > Only by changing the source - line 2208-2218 of m_main.c are the ones > responsible for reserving space for the heap. By default valgrind > obeys the data limit subject to a minimum of 1Mb and a maximum of 8Mb. 8Mb of heap maximum. That's way way more than Old Bill's 640Kb, but it is still a fairly fierce limitation these days :-) Sounds like a good candidate for a config item or command line parameter. John Carter Phone : (64)(3) 358 6639 Tait Electronics Fax : (64)(3) 359 4632 PO Box 1645 Christchurch Email : joh...@ta... New Zealand Carter's Clarification of Murphy's Law. "Things only ever go right so that they may go more spectacularly wrong later." >From this principle, all of life and physics may be deduced. |