Re: Using fork() in a GTK C/Vala application
- From: "Leandro A. F. Pereira" <leandro tia mat br>
- To: gtk-app-devel-list gnome org
- Subject: Re: Using fork() in a GTK C/Vala application
- Date: Tue, 1 Sep 2015 12:49:42 -0300
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]