JDK-8151805 : fatal error: heap walk aborted with error 1
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_7
  • CPU: x86_64
  • Submitted: 2016-03-14
  • Updated: 2016-06-09
  • Resolved: 2016-05-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.
JDK 9
9 b122Fixed
Related Reports
Relates :  
Description
This is actually a result of a failed fix for the JDK-8028749.
As described in that bug, the reason for the crash is that with gflags HeapWalk() call fails with ERROR_INVALID_FUNCTION.
But for some reason the actual fix was to check the result of the HeapLock() call.
On my system (Win7 x64) with the page heap verification enabled by "gflags.exe -I java.exe +hpa" java -version crashes with the error message 
#  Internal Error (C:\jdk9\hotspot\src\os\windows\vm\os_windows.cpp:5297), pid=7904, tid=5188
#  fatal error: heap walk aborted with error 1

I've verified that this is indeed because the first HeapWalk() call return FALSE and GetLastError() returns 1.
Also I verified that the fix suggested in that bug fixes the issue.