This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 215225 - Infinite loop in TemplateUtils.checkTemplateType
Summary: Infinite loop in TemplateUtils.checkTemplateType
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 7.3
Hardware: All All
: P2 normal (vote)
Assignee: nnnnnk
URL:
Keywords:
: 215229 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-07-06 08:11 UTC by Vladimir Kvashin
Modified: 2012-09-21 02:25 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
stacks (7.37 KB, text/plain)
2012-07-06 08:11 UTC, Vladimir Kvashin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2012-07-06 08:11:21 UTC
Created attachment 121784 [details]
stacks

When parsing kf3.h file of the ctx project, we've got an infinite loop.
The reason is that getScope() for struct kfrbcd returns reference to self.
Comment 1 Vladimir Kvashin 2012-07-06 11:15:52 UTC
More information available by request (alas, sources we experience this aren't open)
Comment 2 Vladimir Kvashin 2012-07-10 08:42:41 UTC
*** Bug 215229 has been marked as a duplicate of this bug. ***
Comment 3 Alexander Pepin 2012-07-10 15:53:29 UTC
It's not in 7.2, right?
Comment 4 Vladimir Kvashin 2012-07-11 08:42:49 UTC
I think it's not 7.2. It was found in trunk and might be caused by recent (post 7.2)  changes
Comment 5 Vladimir Voskresensky 2012-09-03 09:12:34 UTC
            // then check class or super class
            if (scope instanceof CsmScopeElement) {
                scope = ((CsmScopeElement)scope).getScope();
            } else {
                break;
            }
scope is the same as getScope
Comment 6 nnnnnk 2012-09-14 10:14:40 UTC
fixed:
http://hg.netbeans.org/cnd-main/rev/d68f86aa35d4
Comment 7 Vladimir Voskresensky 2012-09-19 11:48:00 UTC
http://hg.netbeans.org/cnd-main/rev/0a6822a43bda
caused fails
org.netbeans.modules.cnd.highlight.error.UnresolvedIdentifierTest.testBug215225_2
org.netbeans.modules.cnd.modelimpl.impl.services.SelectModelTestCase.testSelectModelGetFunctions
Comment 8 nnnnnk 2012-09-19 12:55:59 UTC
Actually this one:
http://hg.netbeans.org/cnd-main/rev/21446389c785

Because ClassImpl does not have correct equals.
Comment 9 nnnnnk 2012-09-19 13:43:40 UTC
fixed:
http://hg.netbeans.org/cnd-main/rev/0abd0c60904a
Comment 10 Vladimir Voskresensky 2012-09-20 06:32:50 UTC
(In reply to comment #8)
> Actually this one:
> http://hg.netbeans.org/cnd-main/rev/21446389c785
> 
> Because ClassImpl does not have correct equals.
so why the fix is
http://hg.netbeans.org/cnd-main/rev/0abd0c60904a
?

I reverted it.
Comment 11 Vladimir Voskresensky 2012-09-20 06:48:43 UTC
fix equals and other clean ups
http://hg.netbeans.org/cnd-main/rev/3acd30e66d7b
Comment 12 Quality Engineering 2012-09-21 02:25:15 UTC
Integrated into 'main-golden', will be available in build *201209210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/3acd30e66d7b
User: Vladimir Voskresensky <vv159170@netbeans.org>
Log: clean up for #215225 - Infinite loop in TemplateUtils.checkTemplateType