Assert in duchain during PHP Unit-Test

Niko Sams niko.sams at gmail.com
Mon May 11 20:33:48 UTC 2009


On Mon, May 11, 2009 at 7:21 PM, Milian Wolff <mail at milianw.de> wrote:
> David Nolden schrieb:
>>
>> Am Montag 11 Mai 2009 18:29:19 schrieb Milian Wolff:
>>>
>>> I get the following assert during some PHP Unit-Tests, zwabel can you
>>> help out?
>>>
>>> Is it something we have to adapt our duchain releaser to? Or is this a
>>> bug in PHP somewhere?
>>
>> Can you eventually point at a revision where this appeared? This looks a
>> bit strange. Did you try the standard "rm ~/.kdevdurain -rf" thing? I think
>> nothing has been done that you need to adapt to.
>>
>> Greetings, David
>
> Did that just now, doesn't change anything. Don't have time to go though
> revs right now... But could someone post me the svn cmds required to go back
> in time? I'll try it tomorrow than.
svn up -r revision/date

> But Niko, I think you added these tests, did they work for you?
I added because of a duchain bug that did't allow more than about
5000(?) declarations
in one context. Then David added support for that using MonsterBuckets
or something like that.
Afaik this test passed before our hackaton - so it could be related to
the ref-count patches?

Niko

PS: David, this is the code of the test - pretty simple:
void TestDUChain::testLargeNumberOfDeclarations()
{
    TopDUContext* top = new TopDUContext(IndexedString("testurl"),
SimpleRange(0, 0, 6000, 0), 0);
    DUChainReleaser releaseTop(top);
    DUChainWriteLocker lock(DUChain::lock());
    for (int i = 0; i < 6000; ++i) {
        SimpleRange newRange(i, 0, i, 1);
        Declaration* dec = new Declaration(newRange, top);
        dec->setIdentifier(Identifier(QString("dec%0").arg(i)));
        dec->setAbstractType(AbstractType::Ptr(0));
    }
}




More information about the KDevelop-devel mailing list