[Users] gdb output from latest claws-mail git showing a segfault

Ivan Krylov ikrylov at disroot.org
Mon Mar 31 06:19:45 UTC 2025


On Tue, 25 Mar 2025 13:27:59 +0000
Brian Morrison via Users <users at lists.claws-mail.org> wrote:

> I have been suffering from a regular crash in Claws for a long while,
> finally managed to get a backtrace.

Unfortunately, this looks like heap corruption: something overwrote a
pointer in the past (while parsing NNTP?), and now the program is
crashing because of that. Would you be willing to compile Claws-Mail
from source? If yes, it may be worth a try compiling it with sanitizers
enabled:

LD_PRELOAD= ASAN_OPTIONS=detect_leaks=0 \
 ./configure CC='gcc -fsanitize=address,undefined'
# make as usual

You can then run it in a separate profile like so:

LD_PRELOAD= src/claws-mail --alternate-config-dir $HOME/.claws-alternate

The "sanitizers" add safety checks around every pointer access.
Hopefully one of them will catch the moment when the heap is corrupted.
Unfortunately, this is not guaranteed to work: the memory corruption
could be happening in a non-sanitised piece of code loaded into the
process from outside. Valgrind may or may not help in that case (to be
used on a normal build of Claws-Mail without sanitizers), but it comes
at the cost of a significant slowdown.

Both sanitizers and Valgrind may complain about memory leaks. These are
mostly due to libfontconfig, not Claws-Mail, and they wouldn't cause a
crash.

-- 
Best regards,
Ivan


More information about the Users mailing list