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

assert(sym->byte_at(i) == _name[I]) after JDK-8195100 (low latency hash table)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 12
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Introduced In Version:
      12
    • CPU:
      ppc, s390x
    • OS:
      generic

      Description

      Assertion fails on s390x and all ppc platforms. Root cause is assumed to be the following passage from the c++ standard (copied from cppreference.com):

      "char - type for character representation which can be most efficiently processed on the target system (has the same representation and alignment as either signed char or unsigned char, but is always a distinct type). ... The signedness of char depends on the compiler and the target platform. ..."

      From hs_err file:
      # Internal Error (/net/usr.work/openjdk/nb/linuxs390x/nightly/jdk/src/hotspot/share/classfile/symbolTable.cpp:452), pid=8445, tid=8450
      # assert(sym->byte_at(i) == _name[i]) failed: operator()() [0,-17,239]

      Source code:
      #ifdef ASSERT
          assert(sym->utf8_length() == _len, "%s [%d,%d]", where, sym->utf8_length(), _len);
          for (int i = 0; i < _len; i++) {
            assert(sym->byte_at(i) == _name[i],
                   "%s [%d,%d,%d]", where, i, sym->byte_at(i), _name[i]);
          }
      #endif

      Obviously, byte_at(i) does a sign extension when widening the extracted byte to the int result type. _name[] is a char*, thus can be implemented as signed (code works) or unsigned (assertion fails).

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              lucy Lucy Schmidt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: