JDK-4870175 : Wrong exception passed to caller when new exception occurs in computing handler
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 1.4.2_04,5.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,solaris_8
  • CPU: generic,sparc
  • Submitted: 2003-05-27
  • Updated: 2003-06-20
  • Resolved: 2003-06-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 tigerFixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Ken Rusell writes:

I happened to notice that the fix for 4546590 (compute_compiled_exc_handler,
runtime.cpp) has a small problem: it does not cause the new exception
generated during exception handler lookup to be passed back to the caller and
thereby to the Java code. This means that the ClassNotFoundError will not be
seen by the end user; the original exception will be seen in its place. Making the "Handle exception" parameter a "Handle& exception" would have the
correct semantics.



----

How to reproduce:

Use test from 4307310 for test case. 

Compare (incorrect):

java -server -Xcomp -Xfuture -cp test.zip packA.ClsC
Exception in thread "main" packA.ClsE
	at packA.ClsC.doThrow(ClsC.java:8)
	at packB.ClsD.doTryCatch(ClsD.java:9)
	at packA.ClsC.main(ClsC.java:15)

to (correct):
java -server -Xint -Xfuture -cp test.zip packA.ClsC
Exception in thread "main" java.lang.IllegalAccessError: tried to access class packA.ClsE from class packB.ClsD
	at packB.ClsD.doTryCatch(ClsD.java:9)
	at packA.ClsC.main(ClsC.java:15)

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b09
08-07-2004

SUGGESTED FIX ------- runtime.cpp ------- 871c871 < address compute_compiled_exc_handler(nmethod* nm, address ret_pc, Handle exception, bool force_unwind); --- > address compute_compiled_exc_handler(nmethod* nm, address ret_pc, Handle& exception, bool force_unwind); 981c981 < address compute_compiled_exc_handler(nmethod* nm, address ret_pc, Handle exception, bool force_unwind) { --- > address compute_compiled_exc_handler(nmethod* nm, address ret_pc, Handle& exception, bool force_unwind) { 1004c1004,1005 < // thrown (bugs 4307310 and 4546590). --- > // thrown (bugs 4307310 and 4546590). Set "exception" reference > // argument to ensure that the correct exception is thrown (4870175).
08-07-2004

EVALUATION Description is correct. ###@###.### 2003-05-27
27-05-2003