JDK-6227246 : Improve Windows unhandled structured exception reporting
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: generic
  • Submitted: 2005-02-09
  • Updated: 2020-07-30
  • Resolved: 2007-04-24
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 6 JDK 7 Other
6u4Fixed 7Fixed hs10Fixed
Related Reports
Relates :  
Relates :  
Description
Hotspot registers structured exception handlers than handle both expected internally-used exceptions and unexpected exceptions.  One flavor of unexpected exception are those thrown by external libraries called via Java code such as customer native libraries or Windows system libraries.

In a non-Java application, when such an unexpected event occurs and the exception is not handled by the application, Windows displays the "Application Error" message box with a detailed decription of the exception.

In Hotspot, when an unhandled exception is encountered, we do not unwind to the Windows handler, but instead issue our own error report and terminate the process.  In some cases we may not provide as much error information as the Windows handler would have.  It should be investigated whether this situation can be improved.



###@###.### 2005-2-09 15:19:43 GMT

Comments
EVALUATION Fixed 6227246: Improve Windows unhandled structured exception reporting This was fixed by adding a flag -XX:+UseOSErrorReporting which defaults to false for the 6.0 release. The fix in one of the files os_win32.cpp was somehow not included the sources so the WER was never enabled. The original change is modified to print the error reporting dialog for guarantees and assertions as well and also prints out the hs_err file and information to the screen before the WER dialog window is shown. In the long term we want to get rid of UseOSErrorReporting and use WER all the time. Improvements are planned for this in dolphin under bug number 6394477. In this putback, I added an API for finding the hs_err_pid file for use with WER. Fix verified (y/n): y Verified by: sent (1) error report to Microsoft using WER (more with later WER work) Also added bogus asserts/crashes in different places to verify the message box (bogus crashes/asserts subsequently removed). Webrev (includes this and other related fixes): http://jruntime.east/~coleenp/webrev/6227246
23-03-2007

EVALUATION Some of the changes to this fix weren't integrated or were merged out by mistake.
07-08-2006

EVALUATION Iimplemented Windows-only flag -XX+UseOSErrorReporting which allows us instead of running of our crash handler and dying, forward exception handling to the OS in case of actual crash.
25-11-2005