valgrind-detected KJS nasties in 3.0 (fwd)

David Faure david at mandrakesoft.com
Mon Apr 8 13:36:12 BST 2002


On Sunday 07 April 2002 17:11, Harri Porten wrote:
> I got this from Julian whose mail to kde-core-devel doesn't seem to have
> made it through the moderation somehow. David, is this the same problem we
> talked about once ? Looks like commenting out some code wasn't enough
> and another pass in the garbage collection is needed :}

[Don't trust the backtrace, collect() doesn't call setGcAllowed
itself, there are quite a few destructors in between, they get removed by gcc's
tail-recursion-optimization. Anyone knows how to turn this compiler behavior off?]

Yes, it looks like the problem we talked about: due to the undefined destruction
order, the destructors that do setGcAllowed() on other objects, might do that
on deleted objects.

You're right, simply adding a step, telling objects that they're going to be deleted,
before actually deleting them, would fix this.

I'm concentrating on KOffice right now, but if you don't have time for making this
change to KJS, I'll try to remember doing it later.... otherwise, any volunteers? ;)

-- 
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today






More information about the kfm-devel mailing list