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

Assert in MetaspaceShared::preload_and_dump() when printing exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 25
    • None
    • hotspot
    • master

      https://github.com/openjdk/jdk/blob/11ad1733f8db3d8e868383fc9826963b9ffd620f/src/hotspot/share/cds/metaspaceShared.cpp#L802-L805

            aot_log_error(aot)("%s: %s", PENDING_EXCEPTION->klass()->external_name(),
                           java_lang_String::as_utf8_string(java_lang_Throwable::message(PENDING_EXCEPTION)));
            MetaspaceShared::writing_error(err_msg("Unexpected exception, use -Xlog:aot%s,exceptions=trace for detail",
       

      The above code can crash if java_lang_Throwable::message(...) returns nullptr.

            iklam Ioi Lam
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: