From: John R. <jr...@bi...> - 2011-03-31 20:22:31
|
> As far as reading the manual is concerned, I did, and in my initial > post I stated: You are right. I'm sorry I misinterpreted your post. > My interpretation of [0x13dde030, 0x31382050) was that it is > start,end, closed on the left open on the right, not start and length > as you suggest. You are right again. However, this situation actually re-enforces a patch that I submitted a few years ago but which was not accepted. When printing one interval the most helpful notation is "[<base>; +<length>)" which directly gives the base and the length. The length is [strongly related to] what the programmer specified to the allocation routine, and the base is what the allocator returned. It is easier to find the ceiling by mentally adding (base + length) than to find the length by mentally subtracting (ceiling - base). [If you use a debugger then it does not matter.] When printing more than one interval at a time, then perhaps "[base, ceiling)" can be justified because [when the list is sorted by base address] then it is easier to see how close the intervals are to being a partition of some larger interval. > I am trying to determine whether the problem is > (a) not really a problem (i.e. > problem occurs only when using valgrind), One definite problem is peculiar messages from valgrind, as given by the smaller test case. Whether your original program has a problem _without_ valgrind is not particularly evident (it isn't easy to tell.) > (b) is a problem with the > runtime library (the runtime library is leaking a block during > realloc), This is unlikely, although the same problems of part (c) might apply to the runtime library, too. > (c) is a problem with valgrind not being able to deal with > large allocations, This is somewhat likely. Somewhere in valgrind a 'size_t' was truncated to an 'unsigned', or a case analysis forgot one situation, etc. > or (d) a problem in my program. Perhaps. Because you have a somewhat small synthetic test case which triggers the problem (and it is easy to confirm that the problem exists), then I recommend filing a bug report at: http://bugs.kde.org/enter_valgrind_bug.cgi -- |