[U-Boot] [PATCH 08/21] sandbox: Allow running from valgrind

Christian Borntraeger borntraeger at de.ibm.com
Mon Nov 26 09:30:56 UTC 2018



On 24.11.2018 22:31, Alexander Graf wrote:
> 
> 
> On 24.11.18 05:29, Simon Glass wrote:
>> It is useful to run sandbox from valgrind to find memory errors, etc. At
>> present this works OK until U-Boot jumps into the next phase (e.g. from
>> SPL to U-Boot). Update os_jump_to_file() to use valgrind for each
>> subsequent phase also.
>>
>> Signed-off-by: Simon Glass <sjg at chromium.org>
[...]
> 
> Is there a better way to exec into another program but preserve its
> valgrindness than to explicitly call valgrind - and worse - hard code
> the path to valgrind and its invocation type?
> 
> I would've expected valgrind has some way to make it inherit into child
> processes?
> 
> (I've added Christian to CC - he knows his way around valgrind quite a
> bit too)


valgrind follows all forks/clones, but it detaches execve.
You can ask valgrind to also follow execve with the 
 --trace-children=yes
option. Is that what you want?


Christain



More information about the U-Boot mailing list