Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
Macro expansion infinite loop.
oBFusCATed:
I've reported the problem here:
http://forums.codeblocks.org/index.php/topic,19753.msg134925.html#msg134925
http://forums.codeblocks.org/index.php/topic,19753.msg134942.html#msg134942
And I've debugged it a bit more and I know what code pattern breaks it or at least this is what cause it to loop.
You can see it in the following workspace http://cmpt.benbmp.org/codeblocks/nightlies/cc_marco_infinite.zip
Unfortunately when this is extracted from the original code it doesn't have the same effect.
So this project cannot be used to reproduce the problem. :(
ollydbg: Can you look at the project and see if it can give you some hints what is going wrong with this code?
ollydbg:
--- Quote from: oBFusCATed on November 30, 2014, 05:06:36 pm ---ollydbg: Can you look at the project and see if it can give you some hints what is going wrong with this code?
--- End quote ---
I have tried your test workspace, but I don't get much hints. :(
oBFusCATed:
Any hints how to debug it further or how to find what is the thing that causes the problem?
ollydbg:
--- Quote from: oBFusCATed on December 01, 2014, 03:06:49 pm ---Any hints how to debug it further or how to find what is the thing that causes the problem?
--- End quote ---
I have an idea. You can check how many times the function DoAddToken() was called. So, just set a breakpoint in the function, and count the times, if it get a very large number, there indicates a bad situation. E.g. If you workspace contains about 10000 tokens(this can be seen from an old version of C::B which don't cause the infinite loop), and you see DoAddToken() has been called 20000 times in the newer C::B, then it may be in an infinite loop now, and you can step in and see where the infinite loop are.
oBFusCATed:
OK, I've spend some more time and now I was able to make a project that reproduces the problem.
Here it is http://cmpt.benbmp.org/codeblocks/nightlies/cc_marco_infinite2.tar.gz
ollydbg: Can you try to see if you can reproduce and fix the problem?
Navigation
[0] Message Index
[#] Next page
Go to full version