Community
Participate
Working Groups
I updated my eclipse cdt from 2.0 to 2.0.1. Updating works fine, but after the update I have tried to open a large .c file, instead of opening the file eclipse freezes and the processor load is at 99% (maybe endless loop). Opening other .c or .h files works fine. In the newsgroup someone told, that he have the same problem with a smale .c file (~ 400 lines) under linux. I am working with eclipse 3.0 under winxp.
I need a source-code example in order to triage the defect appropriately.
Created attachment 14459 [details] After opening this file, eclipse hangs
I see the hang. We need to fix this for 2.0.2.
There was a bug in the scanner that was continually creating the same token w/buffer length 0 over and over and chaining them together for the parser. This was causing the infinite loop. I fixed the Scanner to be more robust and protect against this. I also fixed the Scanner bug that started this incorrect behaviour flowing. We were not handling escaped newlines within strings well on Windows. (look for \r as well!) I've created a JUnit to ensure this won't happen again. Fix applied to HEAD, AST2 & 2_0 branches.
For Kleo: The code that would cause the infinite loop in the Parser/Scanner was: static char fmt_1002[] = "(/,\002At iterate\002,i5,4x,\002f= \002,1p,d12\ .5,4x,\002|proj g|= \002,1p,d12.5)"; We were mishandling the escaped newline, as all newlines are \r\n on Windows.