asserts in jdk coding (outside hotspot)

Thomas Stüfe thomas.stuefe at
Thu Jun 1 09:20:32 UTC 2017

Hi all,

so, we have the hotspot asserts with all the niceties of our error
reporting. But these asserts are only accessible from within hotspot coding.

In the JDK, in a number of places, I see that we use the standard posix

This means that when we trigger the assert, we will only get a brief
message on stderr and a core, but no hs_err file.

It also means that -XX:+CreateCoredumpOnCrash is ignored, so it is not
possible to switch off those core dumps.

This is unfortunate and also easy to fix. We do not even have to call into
the hotspot to get hotspot asserts. We could just force a NULL pointer
access or send ourselves a SIGILL or something. Anything which triggers the
hotspot signal handling would be fine.

What do you think?

Kind Regards, Thomas

More information about the core-libs-dev mailing list