Re: Using fork() in a GTK C/Vala application



On Tue, Sep 1, 2015 at 10:33 AM, rastersoft <raster rastersoft com> wrote:

It is very subtle, because it hapens usually
after being running for two-three days. It is a double free. I tried
with Valgrind, but when I use it, the error doesn't trigger, which makes
me suspect it is a race condition between both threads (valgrind ensures
that only one thread runs each time).


Maybe you could try giving Thread Sanitizer and/or Address Sanitizer a go.
They're available in recent-ish versions of gcc and clang; just rebuild
your program with CFLAGS and LDFLAGS "-fsanitize=thread" or
"-fsanitize=address". When bad things happen, messages will be printed to
the console and your program aborted.

-- 
 Leandro


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]