octave-maintainers
[Top][All Lists]
Advanced

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

Re: Thread-safety issues in QtHandles


From: Michael Goffioul
Subject: Re: Thread-safety issues in QtHandles
Date: Sat, 5 Nov 2011 20:23:17 +0000

On Sat, Nov 5, 2011 at 1:01 AM, John W. Eaton <address@hidden> wrote:
> On  4-Nov-2011, Michael Goffioul wrote:
>
> | I tried it and got finally rid of the random crashes. My test case is
> | to start the mirone GUI (which is a pretty heavy user of ui* stuff)
> | and before all the changes, I could get a crash 50% of the time. Now,
> | I've launched the GUI 10-15 times and didn't get a single crash.
>
> OK.  I propose the change attached below.  We can make it permanent
> later and actually remove the calls to DECLARE/DEFINE_OCTAVE_ALLOCATOR.
>
> However, after doing this, I see a large number of problems from
> valgrind, mostly about using uninitialized values.  I have to do more
> testing to see whether these are actually not showing up if I use the
> octave_allocator class.  But even if they are not, I'd bet that a
> number of the problems are not new but are just showing up now because
> the memory handed out by the octave_allocator class could have been
> initialized for a previous use but still not actually initialized for
> the current allocation.  But in that case, valgrind wouldn't flag it.
>
> I'll do more testing and try to fix as many of the problems as I can.
>
> I'll also see about adding a "check-with-valgrind" target in the
> Makefile to make running the tests with valgrind easy to do.  It would
> be nice if running the tests with valgrind didn't show any
> problems...  If I can get close to that and there are no objections,
> I'll check in the changes below.

I'm fine with your change. I suggest you apply it, so I can build my
patch on it. AFAIK, if valgrind reports uninitialized values, they
were also uninitialized before removing the octave_allocator, as that
class doesn't initialize the allocated memory. And if the memory was
initialized from a previous allocation, then the content is wrong
anyway. In that regards, I don't think removing octave_allocator
changed anything.

Michael.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]