help-bash
[Top][All Lists]
Advanced

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

using valgrind on a loadable builtin


From: Robert E. Griffith
Subject: using valgrind on a loadable builtin
Date: Wed, 25 May 2022 13:43:46 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1

I am trying to to use valgrind memcheck on my loadable builtin which is getting a "corrupted size vs. prev_size" error but its output is suspiciously clean and when I use the -v (verbose) switch I do not see any msg about my builtin's .so being loaded even though I do see confirmation that the builtin gets loaded and ran in the output. So I suspect that it is not monitoring my .so.

I am running it like...

   valgrind -v  ../../bashParse/bash -c  'bg-dev tests run bg_objects.sh:'

The script enables my builtin.

bash and my builtin are being built with -g and no -O<n>

Anyone have any tips on getting meaningful output from valgrind for a loadable builtin?

BTW, in the debugger, I get the "corrupted size vs. prev_size\nAborted (coredumped)" error when I step into a call to "if (execute_shell_function(fDynCtor, dArgs) == 0) {...". I dont understand how a stepping into a function could be producing this error as opposed to a  malloc family function.

--BobG



reply via email to

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