On 10/4/21 12:27 PM, Andreas Schwab wrote:
> On Okt 04 2021, Chet Ramey wrote:
> 
>> Nope. These are all functions internal to bash and the bash malloc, and
>> they are all defined.
> 
> The problem is that the xmalloc macro redirects directly to the internal
> malloc implementation, whereas the xfree function calls it indirectly
> through the free function.  The latter is seen by valgrind, the former
> isn't, so it didn't track it.  Thus the xmalloc, xrealloc, xfree macros
> need to be disabled if valgrind is used.

OK, now we're back to the invalidating some of valgrind's assumptions.
For this, you can define DISABLE_MALLOC_WRAPPERS while building bash,
which has been there since at least bash-2.05b. I haven't built it that
way in quite a while, but it shouldn't have any problems.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to