Summary: | [compiler] OutOfMemoryError compiling deeply nested try-catch | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Art Dyer <art.dyer> | ||||||||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||||
Severity: | normal | ||||||||||||
Priority: | P3 | ||||||||||||
Version: | 3.1 | ||||||||||||
Target Milestone: | 3.1.2 | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Windows 2000 | ||||||||||||
Whiteboard: | |||||||||||||
Attachments: |
|
Description
Art Dyer
2005-11-02 18:15:23 EST
The problem comes from the code generation. I am investigating. The problem comes from the forward reference count inside the labels. Created attachment 29248 [details]
Proposed fix
In practice, forward refs are generally sorted already (per construction). Thus I suspect Arrays.sort(int[],...) is not optimized for this scenario. Also note that individual additions of forward refs is not checking for duplicates (only checked when adding all refs from other label). Once fixed, should be backported to 3.1, and likely to 3.0. Created attachment 29255 [details]
Variation on the patch which isn't performing any sorting
It does check for dup addition of single forward refs. If array size remains
small , the non sorting may not be an issue.
Created attachment 29265 [details]
New proposal
Created attachment 29267 [details]
New proposal
This will be released as soon as M3 is declared.
Backported to 3.1 maintenance stream. Added regression test org.eclipse.jdt.core.tests.compiler.regression.TryStatementTest.test031 Backported to 3.0 maintenance stream. Added regression test org.eclipse.jdt.core.tests.compiler.regression.TryStatementTest.test026 Fixed and released in HEAD. Added regression test org.eclipse.jdt.core.tests.compiler.regression.TryStatementTest.test032 Verified for 3.2 M4 using build I20051212-0010 Reopen for 3.1.2 verification We also need to verify that's this bug fix is in R3_1_maintenance stream as well before 3.1.2 delivery... Verified for 3.1.2 using build M20060109-1200. Verified for 3.1.2 using build M20060109-1200 (maxime) |