- 
    Bug 
- 
    Resolution: Fixed
- 
     P4 P4
- 
    25
- 
        b16
- 
        aarch64
- 
        os_x
                    When running ubsan enabled binaries on macOS aarch, the test serviceability/dcmd/compiler/CompilerMemoryStatisticTest  triggers the following warning :
/priv/jenkins/client-home/workspace/openjdk-jdk-weekly-macos_aarch64-opt/jdk/src/hotspot/share/compiler/compilationMemoryStatistic.cpp:659:21: runtime error: index 64 out of bounds for type 'const struct (unnamed struct at /priv/jenkins/client-home/workspace/openjdk-jdk-weekly-macos_aarch64-opt/jdk/src/hotspot/share/compiler/compilationMemoryStatistic.cpp:649:3)[64]'
#0 0x108d99cf0 in void MemStatStore::iterate_sorted_filtered<MemStatStore::print_table(outputStream*, bool, unsigned long, int) const::'lambda'(MemStatEntry const*)>(MemStatStore::print_table(outputStream*, bool, unsigned long, int) const::'lambda'(MemStatEntry const*), unsigned long, int, MemStatStore::iteration_result&) const compilationMemoryStatistic.cpp:659
#1 0x108d97c68 in MemStatStore::print_table(outputStream*, bool, unsigned long, int) const compilationMemoryStatistic.cpp:734
#2 0x108d9789c in CompilationMemoryStatistic::print_all_by_size(outputStream*, bool, bool, unsigned long, int) compilationMemoryStatistic.cpp:1044
#3 0x108d97b74 in CompilationMemoryStatistic::print_jcmd_report(outputStream*, bool, bool, unsigned long) compilationMemoryStatistic.cpp:1036
#4 0x1090cc72c in DCmd::Executor::execute(DCmd*, JavaThread*) diagnosticFramework.cpp:421
#5 0x108ab6a0c in jcmd(AttachOperation*, attachStream*)::Executor::execute(DCmd*, JavaThread*) attachListener.cpp:391
#6 0x1090cbf64 in DCmd::Executor::parse_and_execute(char const*, char, JavaThread*) diagnosticFramework.cpp:414
#7 0x108ab5f98 in jcmd(AttachOperation*, attachStream*) attachListener.cpp:395
#8 0x108ab2db0 in AttachListenerThread::thread_entry(JavaThread*, JavaThread*) attachListener.cpp:636
#9 0x1093cc254 in JavaThread::thread_main_inner() javaThread.cpp:776
#10 0x109c08d68 in Thread::call_run() thread.cpp:231
#11 0x10992dc44 in thread_native_entry(Thread*) os_bsd.cpp:601
#12 0x1936fef90 in _pthread_start+0x84 (libsystem_pthread.dylib:arm64e+0x6f90)
#13 0x1936f9d30 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d30)
See
https://github.com/openjdk/jdk/blame/master/src/hotspot/share/compiler/compilationMemoryStatistic.cpp#L659
            
/priv/jenkins/client-home/workspace/openjdk-jdk-weekly-macos_aarch64-opt/jdk/src/hotspot/share/compiler/compilationMemoryStatistic.cpp:659:21: runtime error: index 64 out of bounds for type 'const struct (unnamed struct at /priv/jenkins/client-home/workspace/openjdk-jdk-weekly-macos_aarch64-opt/jdk/src/hotspot/share/compiler/compilationMemoryStatistic.cpp:649:3)[64]'
#0 0x108d99cf0 in void MemStatStore::iterate_sorted_filtered<MemStatStore::print_table(outputStream*, bool, unsigned long, int) const::'lambda'(MemStatEntry const*)>(MemStatStore::print_table(outputStream*, bool, unsigned long, int) const::'lambda'(MemStatEntry const*), unsigned long, int, MemStatStore::iteration_result&) const compilationMemoryStatistic.cpp:659
#1 0x108d97c68 in MemStatStore::print_table(outputStream*, bool, unsigned long, int) const compilationMemoryStatistic.cpp:734
#2 0x108d9789c in CompilationMemoryStatistic::print_all_by_size(outputStream*, bool, bool, unsigned long, int) compilationMemoryStatistic.cpp:1044
#3 0x108d97b74 in CompilationMemoryStatistic::print_jcmd_report(outputStream*, bool, bool, unsigned long) compilationMemoryStatistic.cpp:1036
#4 0x1090cc72c in DCmd::Executor::execute(DCmd*, JavaThread*) diagnosticFramework.cpp:421
#5 0x108ab6a0c in jcmd(AttachOperation*, attachStream*)::Executor::execute(DCmd*, JavaThread*) attachListener.cpp:391
#6 0x1090cbf64 in DCmd::Executor::parse_and_execute(char const*, char, JavaThread*) diagnosticFramework.cpp:414
#7 0x108ab5f98 in jcmd(AttachOperation*, attachStream*) attachListener.cpp:395
#8 0x108ab2db0 in AttachListenerThread::thread_entry(JavaThread*, JavaThread*) attachListener.cpp:636
#9 0x1093cc254 in JavaThread::thread_main_inner() javaThread.cpp:776
#10 0x109c08d68 in Thread::call_run() thread.cpp:231
#11 0x10992dc44 in thread_native_entry(Thread*) os_bsd.cpp:601
#12 0x1936fef90 in _pthread_start+0x84 (libsystem_pthread.dylib:arm64e+0x6f90)
#13 0x1936f9d30 in thread_start+0x4 (libsystem_pthread.dylib:arm64e+0x1d30)
See
https://github.com/openjdk/jdk/blame/master/src/hotspot/share/compiler/compilationMemoryStatistic.cpp#L659
- relates to
- 
                    JDK-8344009 Improve compiler memory statistics -           
- Resolved
 
-         
- links to
- 
                     Commit(master)
        openjdk/jdk/a8757332 Commit(master)
        openjdk/jdk/a8757332
- 
                     Review(master)
        openjdk/jdk/24156 Review(master)
        openjdk/jdk/24156