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. _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users