Memory leak from list<CloneList *>

Neven Sajko nsajko at gmail.com
Wed Feb 19 08:52:18 UTC 2020


> Well, actually the hardest part is waiting because LyX is very slow when run under valgrind.

Try sanitizers instead. They are instrumentation that GCC or Clang can
include in executables. They do basically the same thing as Valgrind,
but should be much faster and since you are already compiling your own
Lyx and Qt, the sanitizers should be a more appropriate tool. There
are four sanitizers that you may want to compile with: asan, tsan,
msan, ubsan; each for a different class of bugs.

Instructions: include -fsanitize=asan (replace asan with wanted
sanitizer if you want another one) to both compilation and linking
commands (GCC or Clang) of all libraries and code. It is also a good
idea to disable some compiler optimizations, in particular one should
use -fno-omit-frame-pointer. See
https://github.com/google/sanitizers/wiki for more information.

By default the error reports will be output to stderr, but it is
possible to output them to a file by setting an environment variable
(search for log_path in
https://github.com/google/sanitizers/wiki/AddressSanitizerFlags if in
need of that option).

I hope that was helpful.

Regards,
Neven Sajko


More information about the lyx-devel mailing list