All variants of VMError::report_and_die() have a Thread* parameter, which is assumed to be the current thread - e.g. because reporting code tests this variable for NULL before using ResourceMark.
Almost all callers pass in Thread::current(). Only exception is the secondary signal handler (VMError::crash_handler()), which passes NULL. Arguably this is an error, in practice it does not matter since for secondary crashes the parameter was ignored anyway.
Instead of passing in this parameter, it could just as well retrieved at the entrance of VMError::report_and_die(). VMError::report_and_die() could
but arguably this is wrong too. So it is just easier to
Almost all callers pass in Thread::current(). Only exception is the secondary signal handler (VMError::crash_handler()), which passes NULL. Arguably this is an error, in practice it does not matter since for secondary crashes the parameter was ignored anyway.
Instead of passing in this parameter, it could just as well retrieved at the entrance of VMError::report_and_die(). VMError::report_and_die() could
but arguably this is wrong too. So it is just easier to