Summary: | CDT 2.0.1 freezes after trying to open a large .c file | ||||||
---|---|---|---|---|---|---|---|
Product: | [Tools] CDT | Reporter: | Boris von Loesch <vonloesch> | ||||
Component: | cdt-parser | Assignee: | John Camelon <john.camelon> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | critical | ||||||
Priority: | P3 | CC: | dave.daoust, khapitas, steven.wasleski | ||||
Version: | 2.0 | ||||||
Target Milestone: | 2.0.1 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Boris von Loesch
2004-09-09 05:04:30 EDT
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. |