RFR (S) 8015329: Print reason for failed MiniDumpWriteDump() call
David Holmes
david.holmes at oracle.com
Thu May 23 19:42:07 PDT 2013
Hi Christian,
I wasn't familiar with the FormatMessage call but based on the one other
use we have, and on:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms679351%28v=vs.85%29.aspx
I think you want to just pass zero for the language ID not
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT).
You should also check that FormatMessage succeeds (and just print the
original error code, skipping the human-readable string).
And you should call LocalFree for the allocated buffer after the
jio_snprintf.
Thanks,
David
On 24/05/2013 8:54 AM, Christian Tornqvist wrote:
> Hi everyone,
>
> Please review this small change, we now print the reason for a failed
> call to MiniDumpWriteDump(). Also changed so that we now produce
> minidumps by default on client versions of Windows when running with a
> debug build of the JVM. Note that it is still possible to turn this off
> by –XX:-CreateMinidumpOnCrash
>
> Tested the change by failing the call to MiniDumpWriteDump in a debugger
> and manually verified the output. Verified the minidump on debug builds
> change by running:
>
> java -XX:ErrorHandlerTest=9 –version
>
> java -XX:-CreateMinidumpOnCrash -XX:ErrorHandlerTest=9 –version
>
> java -XX:+CreateMinidumpOnCrash -XX:ErrorHandlerTest=9 –version
>
> Webrev: http://cr.openjdk.java.net/~ctornqvi/webrev/8015329/webrev.00/
>
> Bug (link not yet visible at time of posting):
> http://bugs.sun.com/view_bug.do?bug_id=8015329
>
> Thanks,
>
> Christian
>
More information about the hotspot-runtime-dev
mailing list