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

[Big Endian] assert(verify_guards()) failed: Expected valid memory guards after 8357601

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2 P2
    • None
    • 26
    • hotspot
    • In Review

      After JDK-8357601, we hit assertions on Big Endian platforms:
      assert(verify_guards()) failed: Expected valid memory guards

      V [libjvm.so+0x136892c] GuardedMemory::wrap_copy(void const*, unsigned long, void const*, void const*)+0x23c (guardedMemory.hpp:219)
      V [libjvm.so+0x1674a64] checked_jni_GetStringUTFChars+0x184
      C [libjava.so+0x12a80]

      Product builds also run into failures:
      ReleaseStringUTFChars: release chars failed bounds check. string: 0x0000000110239270 chars: 0x0000000114343508
      GuardedMemory(0x0000000110239058) base_addr=0x00000001143434e0 tag=0x0000000048124812 tag2=0x0000000000000000 user_size=6 user_data=0x0000000114343508
        Header guard @0x00000001143434e0 is BROKEN
        Trailer guard @0x000000011434350e is BROKEN
        User data appears to be in use
      FATAL ERROR in native method: ReleaseStringUTFChars: release chars failed bounds check.
      at java.lang.Class.getPrimitiveClass(java.base/Native Method)
      at java.lang.Float.<clinit>(java.base/Float.java:178)
      at java.lang.Math.<clinit>(java.base/Math.java:2043)
      at java.util.ImmutableCollections$SetN.probe(java.base/ImmutableCollections.java:1253)
      at java.util.ImmutableCollections$SetN.<init>(java.base/ImmutableCollections.java:1162)
      at java.util.Set.of(java.base/Set.java:505)
      at jdk.internal.reflect.ReflectionFactory.<clinit>(java.base/ReflectionFactory.java:371)
      at java.lang.reflect.AccessibleObject.<clinit>(java.base/AccessibleObject.java:487)

      SafeFetch32 is used which puts the wrong value into the least significant Byte on Big Endian platforms.

      In addition, SafeFetch32 looks wrong for platforms which don't support unaligned accesses.

            mdoerr Martin Doerr
            mdoerr Martin Doerr
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: