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: Fri, 4 Nov 2011 18:35:30 +0000

On Thu, Nov 3, 2011 at 4:37 PM, Michael Goffioul
<address@hidden> wrote:
> On Thu, Nov 3, 2011 at 8:55 AM, Michael Goffioul
> <address@hidden> wrote:
>>> Also, do these changes help with the problems you were seeing earlier
>>> with the Qt code?
>>
>> I don't know yet. I wanted to pass the full test suite first.
>
> The first tests still show crashes, though in a more systematic (less
> random) way. Crashes occur in shared_ptr cleanup code in
> octave__user_function::bind_automatic_vars(), so I suspect again
> multiple delete calls. I think I'll have to dig into the parsing code
> and try to use shared_ptr objects when possible to see whether things
> improve.

As a follow-up, I've converted the parser to use shared_ptr instead,
and this actually fixed the problem when running the test in bicg.m.
But I still experienced crashes, so I continued digging and converted
dim_vector class, which I had forgotten. However this still didn't
solve the issue, so I ran octave within valgrind/drd and
discovered/realized that the octave_allocator class is not
thread-safe... [1]

The question is: how to make the octave_allocator thread-safe? For
instance I could use a mutex within the octave_allocator class, but
will that degrade performances significantly? Does it make sense then
to keep the specific allocator?

Michael.

[1] It seems the octave_allocator class is responsible for a large
part of valgrind output.


reply via email to

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