|
From: Michael W. <mic...@gm...> - 2020-05-22 12:22:49
|
Hi! I have searched documentation, internet and header files like memcheck.h, but not found a solution: When running the MariaDB test suite under valgrind, we sometimes may get a core dump. In this case, the leaked memory report can be very long and will be totally useless. What would help a lot is to have a VALGRIND request, like VALGRIND_DO_CLIENT_REQUEST_STMT, that we could use in our signal handler to turn off leak checking. Is that possible and if not, is that something that could get implemented in the future? Is this something that anyone else has ever requested ? Regards, Monty |
|
From: Derrick M. <der...@gm...> - 2020-05-22 13:21:56
|
I am not too familiar with memcheck, but there are client requests to enable/disable checks within a memory range using VG_USERREQ__ENABLE_ADDR_ERROR_REPORTING_IN_RANGE and VG_USERREQ__DISABLE_ADDR_ERROR_REPORTING_IN_RANGE. On Fri, May 22, 2020 at 8:24 AM Michael Widenius <mic...@gm...> wrote: > > Hi! > I have searched documentation, internet and header files like > memcheck.h, but not found a solution: > > When running the MariaDB test suite under valgrind, we sometimes may > get a core dump. In this case, the leaked memory report can be very > long and will be totally useless. > > What would help a lot is to have a VALGRIND request, like > VALGRIND_DO_CLIENT_REQUEST_STMT, that we could use in our signal > handler to turn off leak checking. > > Is that possible and if not, is that something that could get > implemented in the future? > Is this something that anyone else has ever requested ? > > Regards, > Monty > > > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users -- Derrick McKee Phone: (703) 957-9362 Email: der...@gm... |
|
From: Philippe W. <phi...@sk...> - 2020-05-22 13:47:06
|
On Fri, 2020-05-22 at 15:22 +0300, Michael Widenius wrote:
> Hi!
> I have searched documentation, internet and header files like
> memcheck.h, but not found a solution:
>
> When running the MariaDB test suite under valgrind, we sometimes may
> get a core dump. In this case, the leaked memory report can be very
> long and will be totally useless.
>
> What would help a lot is to have a VALGRIND request, like
> VALGRIND_DO_CLIENT_REQUEST_STMT, that we could use in our signal
> handler to turn off leak checking.
>
> Is that possible and if not, is that something that could get
> implemented in the future?
> Is this something that anyone else has ever requested ?
>
> Regards,
> Monty
Hello,
The next version of valgrind is almost ready (Release Candidate was produced
a few days ago).
This release contains a feature to dynamically change many options.
You can obtain the list of dynamically changeable options doing:
valgrind --help-dyn-options
For memcheck, this gives the below help.
Based on this, you should be able to obtain what you need.
Hope this helps
Philippe
valgrind --help-dyn-options
Some command line settings are "dynamic", meaning they can be changed
while Valgrind is running, like this:
From the shell, using vgdb. Example:
$ vgdb "v.clo --trace-children=yes --child-silent-after-fork=no"
From a gdb attached to the valgrind gdbserver. Example:
(gdb) monitor v.clo --trace-children=yes --child-silent-after-fork=no"
From your program, using a client request. Example:
#include <valgrind/valgrind.h>
VALGRIND_CLO_CHANGE("--trace-children=yes");
VALGRIND_CLO_CHANGE("--child-silent-after-fork=no");
dynamically changeable options:
-v --verbose -q --quiet -d --stats --vgdb=no --vgdb=yes --vgdb=full
--vgdb-poll --vgdb-error --vgdb-stop-at --error-markers --show-error-list -s
--show-below-main --time-stamp --trace-children --child-silent-after-fork
--trace-sched --trace-signals --trace-symtab --trace-cfi --debug-dump=syms
--debug-dump=line --debug-dump=frames --trace-redir --trace-syscalls
--sym-offsets --progress-interval --merge-recursive-frames
--vex-iropt-verbosity --suppressions --trace-flags --trace-notbelow
--trace-notabove --profile-flags --gen-suppressions=no
--gen-suppressions=yes --gen-suppressions=all --errors-for-leak-kinds
--show-leak-kinds --leak-check-heuristics --show-reachable
--show-possibly-lost --freelist-vol --freelist-big-blocks --leak-check=no
--leak-check=summary --leak-check=yes --leak-check=full --ignore-ranges
--ignore-range-below-sp --show-mismatched-frees
valgrind: Use --help for more information.
|
|
From: John R. <jr...@bi...> - 2020-05-22 14:10:15
|
> What would help a lot is to have a VALGRIND request, like
> VALGRIND_DO_CLIENT_REQUEST_STMT, that we could use in our signal
> handler to turn off leak checking.
In valgrind-3.16 (to be released in 3 days; RC2 available today) see
valgrind --help-dyn-options
|