Summary: | ArrayIndexOutOfBoundsException while editing Java code | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Walter Harley <eclipse> | ||||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | major | ||||||||
Priority: | P3 | CC: | jerome_lanneluc, kent_johnson, philippe_mulet | ||||||
Version: | 3.3 | ||||||||
Target Milestone: | 3.3 M7 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Walter Harley
2007-04-05 19:54:22 EDT
Created attachment 63129 [details]
zipped log file
Forgot to say: this is being reported against I20070403-1110. This would indicate a case where keyTable and valueTable are out of sync. Looking at the code I don't see this being possible, unless some concurrency is occurring. Feels like possible is shared DOM AST is being used by various threads, and are lazily populated, as implied by: org.eclipse.jdt.core.dom.TypeBinding.getDeclaredMethods(TypeBinding.java:266) First thinking is that the DOM AST should be synchronized. Olivier - please look into protecting the DOM calls to prevent concurrent accesses to Binary type bindings. Feels like in 3.4, we want to allow compiler to use concurrency (to exploit multicore processors), so some synchronization may occur at that level. Until so, we have this weakness (which we had since day-1). Need to be careful to avoid introducing deadlocks. I propose to synchronize the getDeclaredMethods(), getDeclaredFields(), ... methods. Created attachment 64309 [details]
Proposed patch
Jérôme, what do you think?
Just being paranoid: are we certain that we don't call out from any synchronized methods ? I could not find a case where we do. Then the patch looks good to me. Released for 3.3M7. Verified for 3.3 M7 using source code v_751. Checked that the patch was applied. |