Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8256954

Remove Thread parameter from VMError::report_and_die

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • tbd
    • 18
    • hotspot

      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

            stuefe Thomas Stuefe
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: