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

Incorrect AVX3Threshold results into code buffer overflows on APX targets

XMLWordPrintable

    • b03
    • x86_64
    • generic

        As per the latest architecture-instruction-set-extensions-programming-reference manual version 57, upcoming Diamond Rapids server with APX feature has CPU family ID different from prior Xeons.

        Recently integrated EEVEX to REX2 demotion support with JDK-8351994 already handles this through a newly defined VM_Version::is_intel_server_family() API, but the existing AVX3Thereholds setting is agnostic to this change, which causes code buffer overflows during arraycopy stubs generation.

        SPR2>sde64 -dmr -ptr_raise -- /home/jatinbha/sandboxes/apx-validation/jdk/build/linux-x86_64-server-slowdebug/images/jdk/bin/java -XX:AVX3Threshold=4096
              -Dtest.vm.opts= -Dtest.tool.vm.opts= -Dtest.compiler.opts= -Dtest.java.opts= -Dtest.jdk=/home/jatinbha/sandboxes/apx-v
        alidation/jdk/build/linux-x86_64-server-slowdebug/images/jdk -Dcompile.jdk=/home/jatinbha/sandboxes/apx-validation/jdk/build/linux-x86_64-server-slo
        wdebug/images/jdk -Dtest.timeout.factor=4.0 -Dtest.root=/root/jatinbha/sandboxes/apx-validation/jdk/test/hotspot/jtreg -Dtest.name=r
        untime/StringIntrinsic/StringIndexOfChar.java -Dtest.verbose=Verbose[p=FULL,f=FULL,e=FULL,t=false,m=false] -Dtest.file=/root/jatinbha/sandbo
        xes/apx-validation/jdk/test/hotspot/jtreg/runtime/StringIntrinsic/StringIndexOfChar.java -Dtest.src=/root/jatinbha/sandboxes/apx-validation/jdk/test
        /hotspot/jtreg/runtime/StringIntrinsic -Dtest.src.path=/root/jatinbha/sandboxes/apx-validation/jdk/test/hotspot/jtreg/runtime/StringIntrinsic
          -Dtest.classes=/root/jatinbha/sandboxes/apx-validation/jdk/test/hotspot/jtreg/runtime/StringIntrinsic/JTwork/classes/runtime/StringIntrinsic/StringIndexOf
        Char.d -Dtest.class.path=/root/jatinbha/sandboxes/apx-validation/jdk/test/hotspot/jtreg/runtime/StringIntrinsic/JTwork/classes/runtime/StringIntrins
        ic/StringIndexOfChar.d -XX:-CompactStrings com.sun.javatest.regtest.agent.MainWrapper /root/jatinbha/sandboxes/apx-validation/jdk/test/hotsp
        ot/jtreg/runtime/StringIntrinsic/JTwork/runtime/StringIntrinsic/StringIndexOfChar.d/main.0.jta
        #
        # A fatal error has been detected by the Java Runtime Environment:
        #
        # Internal Error (/root/jatinbha/sandboxes/apx-validation/jdk/src/hotspot/share/asm/codeBuffer.hpp:202), pid=2503341, tid=2503344
        # assert(allocates2(pc)) failed: not in CodeBuffer memory: 0x00007fc3c21c84e0 <= 0x00007fc3c21cff39 <= 0x00007fc3c21cff38
        #
        # JRE version: (26.0) (slowdebug build )
        # Java VM: OpenJDK 64-Bit Server VM (slowdebug 26-internal-adhoc.root.jdk, mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
        # Problematic frame:
        # V [libjvm.so+0x764fb7] CodeSection::set_end(unsigned char*)+0x53
        #
        # Core dump will be written. Default location: Core dumps may be processed with "/usr/lib/systemd/systemd-coredump %P %u %g %s %t %c %h %e" (or dumping to /root/jatinbha/sandboxes/apx-validation/jdk/test/hotspot/jtreg/runtime/StringIntrinsic/core.2503341)
        #
        # An error report file with more information is saved as:
        # /root/jatinbha/sandboxes/apx-validation/jdk/test/hotspot/jtreg/runtime/StringIntrinsic/hs_err_pid2503341.log
        #

              jbhateja Jatin Bhateja
              jbhateja Jatin Bhateja
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: