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

ClassVerifier frees exception message while it's still in use

    XMLWordPrintable

Details

    • b89

    Backports

      Description

        While testing the CompactStrings implementation, I encountered weird crashes in java_lang_String::create_from_str(const char* utf8_str) that were due to 'utf8_str' containing garbage.

        V [libjvm.so+0x1160d00] VMError::report_and_die()+0x160
        V [libjvm.so+0x83276f] report_should_not_reach_here(char const*, int)+0x6f
        V [libjvm.so+0xae52df] java_lang_String::create_from_str(char const*, Thread*)+0x28f
        V [libjvm.so+0x901ab5] Exceptions::new_exception(Thread*, Symbol*, char const*, Handle, Handle, Handle, Exceptions::ExceptionMsgToUtf8Mode)+0x225
        V [libjvm.so+0x9021ab] Exceptions::_throw_msg(Thread*, char const*, int, Symbol*, char const*)+0x12b
        V [libjvm.so+0x1142e5b] Verifier::verify(instanceKlassHandle, Verifier::Mode, bool, Thread*)+0xa9b

        It turned out that the problem is in the ClassVerifier freeing the exception message while it's still in use.

        Attachments

          Issue Links

            Activity

              People

                thartmann Tobias Hartmann
                thartmann Tobias Hartmann
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: