JDK-8144953 : runtime/CommandLine/TraceExceptionsTest.java fails when exception is thrown in compiled code
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2015-12-08
  • Updated: 2017-08-17
  • Resolved: 2016-01-12
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.
JDK 9
9 b105Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Description
It works fine in the interpreter:

Exception <a 'java/lang/ClassNotFoundException': NoClassFound> (0x000000009235a8f0)
 thrown in interpreter method <{method} {0x00007f2828a3dec0} 'findClass' '(Ljava/lang/String;)Ljava/lang/Class;' in 'java/net/URLClassLoader'>
 at bci 44 for thread 0x00007f283c011000

but not in compiled code:

Exception <a 'java/lang/ClassNotFoundException'> (0x00000000923a6420) thrown in compiled method <{method} {0x00007ff899815bb0} 'loadClass' '(Ljava/lang/String;Z)Ljava/lang/Class;' in 'java/lang/ClassLoader'> at PC 0x00007ff8c9d6717c for thread 0x00007ff8dc011000

Running with -Xcomp shows this but passes because it's lucky that one frame is an interpreter frame.
Comments
I don't think the logging/ExceptionsTest.java failure is related to this bug. This bug is due to an elongated compiled method logging message not being printed, whereas the logging test is looking for any compiled method logging message. In other words, the logging test is failing because somehow even though I've specified it should compile the method and look for the compilation message, that message is missing. And that's a different issue we'll have to sort out. I've filed a separate bug, JDK-8146137.
04-01-2016