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

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • tbd
    • 12
    • hotspot
    • 12
    • ppc, s390x
    • generic

      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).

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

              Created:
              Updated:
              Resolved: