Bug 543089 - ICE on return from finally block
Summary: ICE on return from finally block
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.8   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords: regression
: 543090 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-12-30 01:30 EST by Pavel Bludov CLA
Modified: 2023-01-04 17:29 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Bludov CLA 2018-12-30 01:30:09 EST
public class TestClass {
    public void method() {
	try (AutoCloseable c = () -> {}) {
	    return;
	} finally {
	    return;
	}
    }
}

$ javac TestClass.java
(no output, compilation succeeded)

$ java -jar ecj-4.10.jar -verbose -source 8.0  TestClass.java

[parsing    TestClass.java - #1/1]
[reading    java/lang/Object.class]
[analyzing  TestClass.java - #1/1]
[reading    java/lang/Throwable.class]
[reading    java/lang/AutoCloseable.class]
[reading    java/lang/Exception.class]
----------
1. ERROR in TestClass.java (at line 0)
	public class TestClass {
	^
Internal compiler error: java.lang.ArrayIndexOutOfBoundsException: -1 at org.eclipse.jdt.internal.compiler.codegen.ExceptionLabel.placeEnd(ExceptionLabel.java:54)
----------
2. WARNING in TestClass.java (at line 5)
	} finally {
			return;
		}
	          ^^^^^^^^^^^^^^^^
finally block does not complete normally
----------
-1
Comment 1 Stephan Herrmann CLA 2018-12-30 13:23:14 EST
The warning has been given since version 4.4.2 (min. for -1.8).

The Internal compiler error is thrown since 4.8 M7.
This makes bug 533187 a suspect for causing this regression.
Comment 2 Stephan Herrmann CLA 2018-12-30 13:26:18 EST
*** Bug 543090 has been marked as a duplicate of this bug. ***
Comment 3 Eclipse Genie CLA 2020-12-20 15:37:26 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Eclipse Genie CLA 2023-01-04 15:24:08 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 5 Stephan Herrmann CLA 2023-01-04 17:29:05 EST
Exception is still thrown in HEAD.