Subject: Re: bug#16901: 24.3.50; emacs_backtrace.txt

From: Dmitry Antipov <[email-masked]>
Date: Fri, 28 Feb 2014 19:44:46 +0400

[CC: to emacs-devel@ in attempt to initiate a broader discussion]

On 02/28/2014 06:26 PM, Eli Zaretskii wrote:

> Would it be possible to install some debugging code that could
> pinpoint the problem, or at least give further ideas?  Or is the
> problem so subtle that any code which uses strings could be the
> culprit?

Hm... are there crashes around sweep_strings on platforms other
than MS-Windows?

Now I have two crash reports to make me worry about GC. Both are
irregular and looks hard to reproduce:

  - this bug (crash in compact_small_strings, MS-Windows only (?))

  - http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16817#11 - crash
    marking C stack, OSX-only (?)

These crashes may be originated by the same bug (probably irregular
heap corruption). It's known that GC-related crashes may be caused
by freeing fonts during gc_sweep; this is
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16069, but it should
not affect MS-Windows and OSX (and hopefully I'll fix it soon).

On GNU/Linux, valgrind makes great job in finding memory-related
errors; if there are similar tools for other platforms, it would
be nice to try. And what about using GCC and (sorry RMS) LLVM
sanitizers?

Dmitry