| Summary: | [1.7] NPE in org.eclipse.jdt.internal.compiler.ClassFile.traverse(ClassFile.java:4507) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Volker Berlin <volker.berlin> | ||||||
| Component: | Core | Assignee: | Satyam Kandula <satyam.kandula> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | critical | ||||||||
| Priority: | P3 | CC: | jarthana, Olivier_Thomann, srikanth_sankaran | ||||||
| Version: | 3.7 | Flags: | srikanth_sankaran:
review+
Olivier_Thomann: review+ |
||||||
| Target Milestone: | 3.7.1 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Volker Berlin
Created attachment 201019 [details]
Eclipse log file
Log file from the compiler error
Satyam, please take a look. Smaller testcase to reproduce the problem.
#########
public class X {
public static void foo() {
X z;
while ((z = getObject()) != null) {
z.bar();
}
}
public void bar() {}
public static X getObject() {
return null;
}
}
##########
(In reply to comment #3) > Smaller testcase to reproduce the problem. Have you been able to check if this is due to recent regression ? How far back does the current behavior date ? (In reply to comment #4) > (In reply to comment #3) > > Smaller testcase to reproduce the problem. > > Have you been able to check if this is due to recent regression ? > How far back does the current behavior date ? Checked it myself, is fine on 3.7, so this is a regression that has come in due to the merge from the BETA_JAVA7 branch. (In reply to comment #5) > (In reply to comment #4) > > (In reply to comment #3) > > > Smaller testcase to reproduce the problem. > > > > Have you been able to check if this is due to recent regression ? > > How far back does the current behavior date ? > > Checked it myself, is fine on 3.7, so this is a regression that has > come in due to the merge from the BETA_JAVA7 branch. Regression caused by the fix for bug 352145 ? (In reply to comment #6) > Regression caused by the fix for bug 352145 ? Yes, that's I right and I should have mentioned :( Created attachment 201116 [details]
Proposed patch
Added the necessary null in the patch.
(In reply to comment #8) > Created attachment 201116 [details] > Proposed patch > > Added the necessary null in the patch. This patch is on top of HEAD. Srikanth, Please review. Patch looks good. Could you please mention the bug URL in a // comment and release it. I'll mark Olivier for additional review, but we can release it already. Released in HEAD and 3.7.1 Maintenance branch The null check is indeed required in case of backwards branching (aload0 is reached before astore0 when iterating over the bytecodes in a linear way). Verified for 3.7.1 RC2 with build M20110824-0800. Verified for 3.8M2. |