[KDevelop] 7e5dd1f: Revert "make CPP unit tests work again"

Milian Wolff mail at milianw.de
Thu May 27 19:20:18 UTC 2010


Andreas Pakulat, 27.05.2010:
> On 27.05.10 14:03:04, Milian Wolff wrote:
> > commit 7e5dd1fd0f0d50b4a3ca235cb791c4eb465be599
> > Author: Milian Wolff <mail at milianw.de>
> > Date:   Thu May 27 20:06:31 2010 +0200
> > 
> >     Revert "make CPP unit tests work again"
> >     
> >     lead to random segfaults when parsing big projects,
> >     maybe related to multithreading.
> 
> I don't see how making statics into static functions could cause this.
> So maybe its the changes to the environment manager? Maybe the existing
> static functions where re-entrant but the singleton is not anymore?
> 
> >     We apparently need a better way to fix our unit tests...
> 
> So, what options do we have? I'd really like to keep the changes in the
> language library, in particular the non-existing split into two binaries
> is very nice for debugging and asking users to generate valgrind logs.
> Of course if there's no suitable way to do that we'll have to revert
> that and live with the two binaries.

I'm all for keeping it. Really, it's much cleaner and nicer to work with.

I've found a way to "fix" my first attempt at the fix. It breaks due to 
multithreading which I didn't notice before since I only ran kdevelop with 
projects that had proper duchain already setup and hence didn't trigger this 
case that only occurred during heavy reparsing.

My "fix" is calling one of the new getters earlier so that it is already 
initialized before two threads try to call it.

But I think this is kind of ugly... is this a "proper" fix? Do I need to do 
this for _every_ such getter?

> Apologies for not running the unit-tests before merging the branch, I
> didn't think they'd break so badly if the actual app still works. Lesson
> learned :)

Bad Andreas :P

Bye
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100527/92748a68/attachment.sig>


More information about the KDevelop-devel mailing list