Community
Participate
Working Groups
The test case below causes the stack overflow due to an infinite loop amongst scanner.expandDefinition() scanner.getMacroParameters() scanner.nextToken() scanner.processKeywordOrIdentifier() The test case is as follows: #define a(i) i #define b a(b) void main() { b; }
Created attachment 10561 [details] test case
The problem is that subScanner's have their own context stack and thus have no idea about whether or not they are circularly recursing. As I fix this defect, I shall remove the subscanners, making the system more performant and scalable.
Dave has submitted the work to remove the subscanners. This problem is now fixed as a result. JUnit test cases have been added to validate this in the scanner, QuickParser and CompleteParser.