JDK-8191101 : Show register content in hs-err file on assert
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 10
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-11-12
  • Updated: 2020-08-11
  • Resolved: 2018-03-30
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 11
11 b10Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
At SAP we added a small feature to retrieve the current context when an assert happens and make that part of the hs-err file.
That works similar to the SafeFetch logic: when an assert happens, we trigger a segfault and in the signal handler we squirrel the ucontext away, before continuing with error reporting. 

We do this right after the assert condition was evaluated, within the assert macro itself, as to preserve the context as close to the assertion point as possible.

A short poll on hotspot-runtime-dev [1] indicated that there is interest we contribute this feature.

[1] http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2017-October/025018.html
Comments
Work started, a patch proposal was posted on hotspot-runtime. Currently stalled due to lack of time.
22-02-2018