bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running bash under valgrind gives "invalid free()"


From: Chet Ramey
Subject: Re: Running bash under valgrind gives "invalid free()"
Date: Thu, 13 Apr 2017 11:14:43 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 4/13/17 10:55 AM, Reuben Thomas wrote:

> ​Trying to understand this at a source level, if I capture the compilation
> command for evalstring.c​ and replace -c with -E to preprocess it, I see
> that the relevant line has become:
> 
> add_unwind_protect (xfree, orig_string)
> 
> where xfree is now the function name (in xmalloc.c).
> 
> So this still looks wrong (it should be sh_xfree, surely?).

No. See my previous message for how these functions fit together.  You
don't want tracing information from xfree, since it's misleading when
called via a function pointer from the unwind-protect code.

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]