Bug #19186 2013-11-08 01:11
ollydbg
__UnnamedStructXXX, the XXX will increase on a parse
This cause the basicsearchtree becomes bigger and bigger.
http://developer.berlios.de/patch/?func=detailpatch&patch_id=3494&group_id=5358
Quote: There was one question in the meantime: if the CC need to parse a piece of code over and over, would it be possible that it will introduce the new __UnnamedXX (where XX is a number) alias with each pass? If this is the case, it's bad. I didn't tested this yet. Quote End.
Oh, I can confirm this is a bug.
If you have such code:
struct
{
int x;
float y;
} abc;
int main (int argc, char** argv)
{
}
Once you edit this code, and press Save button, the parser runs again, and look at the symbol tree, the __UnnamedStructXXX will increase by one. I also see the dumped basicsearchtree, and it is growing.
- Category
- Plugin::CodeCompletion
- Group
- Status
- Closed
- Close date
- 2013-11-08 03:02
- Assigned to
- ollydbg
History
One method to solve this problem is to let the XXX reset on every new source file.
For example, in a.cpp when meet an un-named Struct, we can create a Token named:
__Unnamed_a_cpp_1
__Unnamed_a_cpp_2
...
So, when re-parse this source file, the two Tokens were removed in the Token* vector (the name were still in the basic-search-tree, as our basic-search-tree can do not have a delete function)
So, next time, the Token with the same name is added.
Fixed in rev 9438