================================================================= ==183655==ERROR: AddressSanitizer: heap-use-after-free on address 0x5130000f1791 at pc 0xffffa7c089e8 bp 0xffff720fee90 sp 0xffff720feea8 READ of size 1 at 0x5130000f1791 thread T22 (C1 CompilerThre) #0 0xffffa7c089e4 in CompileBroker::invoke_compiler_on_method(CompileTask*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:2377 #1 0xffffa7c09e48 in CompileBroker::compiler_thread_loop() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:1975 #2 0xffffa8e2c9a4 in JavaThread::thread_main_inner() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/javaThread.cpp:776 #3 0xffffa8e49c28 in JavaThread::run() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/javaThread.cpp:761 #4 0xffffab632ed8 in Thread::call_run() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/thread.cpp:231 #5 0xffffaa4f4b50 in thread_native_entry /tmp/tone/run/jtreg/jdk-repo/src/hotspot/os/linux/os_linux.cpp:877 #6 0xffffbe4f0c24 in asan_thread_start ../../.././libsanitizer/asan/asan_interceptors.cpp:234 #7 0xffffbdb47f70 in start_thread (/lib64/libpthread.so.0+0x7f70) (BuildId: 0d3d7285cc0e5a0a08cdc7580b1719454ac2f2a8) #8 0xffffbdc08f98 in thread_start (/lib64/libc.so.6+0x28f98) (BuildId: aabb4443d2eba4b2527cdf66d7295d1d61db58b0) 0x5130000f1791 is located 273 bytes inside of 378-byte region [0x5130000f1680,0x5130000f17fa) freed by thread T22 (C1 CompilerThre) here: #0 0xffffbe56632c in free ../../.././libsanitizer/asan/asan_malloc_linux.cpp:52 #1 0xffffa7c3fc18 in CHeapObjBase::operator delete(void*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/memory/allocation.hpp:172 #2 0xffffa7c3fc18 in CHeapObj<(MemTag)7>::operator delete(void*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/memory/allocation.hpp:217 #3 0xffffa7c3fc18 in DirectivesStack::release(DirectiveSet*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilerDirectives.cpp:745 #4 0xffffa7c05870 in CompileBroker::invoke_compiler_on_method(CompileTask*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:2343 #5 0xffffa7c09e48 in CompileBroker::compiler_thread_loop() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:1975 #6 0xffffa8e2c9a4 in JavaThread::thread_main_inner() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/javaThread.cpp:776 #7 0xffffa8e49c28 in JavaThread::run() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/javaThread.cpp:761 #8 0xffffab632ed8 in Thread::call_run() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/thread.cpp:231 #9 0xffffaa4f4b50 in thread_native_entry /tmp/tone/run/jtreg/jdk-repo/src/hotspot/os/linux/os_linux.cpp:877 #10 0xffffbe4f0c24 in asan_thread_start ../../.././libsanitizer/asan/asan_interceptors.cpp:234 #11 0xffffbdc08f98 in thread_start (/lib64/libc.so.6+0x28f98) (BuildId: aabb4443d2eba4b2527cdf66d7295d1d61db58b0) previously allocated by thread T1 here: #0 0xffffbe567448 in malloc ../../.././libsanitizer/asan/asan_malloc_linux.cpp:69 #1 0xffffaa4c9540 in os::malloc(unsigned long, MemTag, NativeCallStack const&) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/os.cpp:657 #2 0xffffa6cda738 in AllocateHeap(unsigned long, MemTag, NativeCallStack const&, AllocFailStrategy::AllocFailEnum) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/memory/allocation.cpp:41 #3 0xffffa6cda738 in AllocateHeap(unsigned long, MemTag, AllocFailStrategy::AllocFailEnum) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/memory/allocation.cpp:51 #4 0xffffa7c3c5ac in CHeapObjBase::operator new(unsigned long, MemTag) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/memory/allocation.hpp:127 #5 0xffffa7c3c5ac in CHeapObj<(MemTag)7>::operator new(unsigned long) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/memory/allocation.hpp:181 #6 0xffffa7c3c5ac in DirectiveSet::clone(DirectiveSet const*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilerDirectives.cpp:616 #7 0xffffa7c4559c in DirectiveSetPtr::cloned() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilerDirectives.cpp:359 #8 0xffffa7c4559c in DirectiveSet::compilecommand_compatibility_init(methodHandle const&) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilerDirectives.cpp:431 #9 0xffffa7c499c8 in DirectiveSet::compilecommand_compatibility_init(methodHandle const&) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilerDirectives.cpp:385 #10 0xffffa7c499c8 in DirectivesStack::getMatchingDirective(methodHandle const&, AbstractCompiler*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilerDirectives.cpp:787 #11 0xffffa7c15cc0 in CompileTask::initialize(int, methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, bool) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileTask.cpp:123 #12 0xffffa7bff7fc in CompileBroker::create_compile_task(CompileQueue*, int, methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, bool) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:1639 #13 0xffffa7bff7fc in CompileBroker::compile_method_base(methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, bool, Thread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:1326 #14 0xffffa7c02168 in CompileBroker::compile_method(methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, DirectiveSet*, JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:1487 #15 0xffffa7c03cdc in CompileBroker::compile_method(methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:1360 #16 0xffffa7b1e2e8 in CompilationPolicy::compile(methodHandle const&, int, CompLevel, JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilationPolicy.cpp:815 #17 0xffffa7b21f20 in CompilationPolicy::method_invocation_event(methodHandle const&, methodHandle const&, CompLevel, nmethod*, JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilationPolicy.cpp:1151 #18 0xffffa7b2a66c in CompilationPolicy::event(methodHandle const&, methodHandle const&, int, int, CompLevel, nmethod*, JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilationPolicy.cpp:736 #19 0xffffa8d207f8 in InterpreterRuntime::frequency_counter_overflow_inner(JavaThread*, unsigned char*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/interpreter/interpreterRuntime.cpp:1074 #20 0xffffa8d21054 in InterpreterRuntime::frequency_counter_overflow(JavaThread*, unsigned char*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/interpreter/interpreterRuntime.cpp:1023 #21 0xffff94897e9c () #22 0xffff94894d3c () #23 0xffff94894d3c () #24 0xffff948947fc () #25 0xffff948947fc () #26 0xffff948947fc () #27 0xffff948947fc () #28 0xffff94894d3c () #29 0xffff948947fc () #30 0xffff948947fc () #31 0xffff948947fc () #32 0xffff94890190 () #33 0xffffa8d84134 in JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/javaCalls.cpp:415 #34 0xffffa8d89f00 in JavaCalls::call(JavaValue*, methodHandle const&, JavaCallArguments*, JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/javaCalls.cpp:323 #35 0xffffa8d89f00 in JavaCalls::call_static(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/javaCalls.cpp:250 #36 0xffffab69a4a8 in call_initPhase2 /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/threads.cpp:322 #37 0xffffab69a4a8 in Threads::create_vm(JavaVMInitArgs*, bool*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/threads.cpp:771 Thread T22 (C1 CompilerThre) created by T9 (C1 CompilerThre) here: #0 0xffffbe560b58 in pthread_create ../../.././libsanitizer/asan/asan_interceptors.cpp:245 #1 0xffffaa4fc2a8 in os::create_thread(Thread*, os::ThreadType, unsigned long) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/os/linux/os_linux.cpp:1069 #2 0xffffa7c80bf8 in CompilerThread::CompilerThread(CompileQueue*, CompilerCounters*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilerThread.cpp:33 #3 0xffffa7be2a38 in CompileBroker::make_thread(CompileBroker::ThreadType, _jobject*, CompileQueue*, AbstractCompiler*, JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:855 #4 0xffffa7bfc85c in CompileBroker::possibly_add_compiler_threads(JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:1115 #5 0xffffa7c09c90 in CompileBroker::compiler_thread_loop() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:1987 #6 0xffffa8e2c9a4 in JavaThread::thread_main_inner() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/javaThread.cpp:776 #7 0xffffa8e49c28 in JavaThread::run() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/javaThread.cpp:761 #8 0xffffab632ed8 in Thread::call_run() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/thread.cpp:231 #9 0xffffaa4f4b50 in thread_native_entry /tmp/tone/run/jtreg/jdk-repo/src/hotspot/os/linux/os_linux.cpp:877 #10 0xffffbe4f0c24 in asan_thread_start ../../.././libsanitizer/asan/asan_interceptors.cpp:234 #11 0xffffbdc08f98 in thread_start (/lib64/libc.so.6+0x28f98) (BuildId: aabb4443d2eba4b2527cdf66d7295d1d61db58b0) Thread T9 (C1 CompilerThre) created by T1 here: #0 0xffffbe560b58 in pthread_create ../../.././libsanitizer/asan/asan_interceptors.cpp:245 #1 0xffffaa4fc2a8 in os::create_thread(Thread*, os::ThreadType, unsigned long) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/os/linux/os_linux.cpp:1069 #2 0xffffa7c80bf8 in CompilerThread::CompilerThread(CompileQueue*, CompilerCounters*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compilerThread.cpp:33 #3 0xffffa7be2a38 in CompileBroker::make_thread(CompileBroker::ThreadType, _jobject*, CompileQueue*, AbstractCompiler*, JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:855 #4 0xffffa7bf8c00 in CompileBroker::init_compiler_threads() /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:989 #5 0xffffa7bfab70 in CompileBroker::compilation_init(JavaThread*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:683 #6 0xffffab69ad00 in Threads::create_vm(JavaVMInitArgs*, bool*) /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/runtime/threads.cpp:749 #7 0xffffa919c130 in JNI_CreateJavaVM_inner /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/prims/jni.cpp:3587 #8 0xffffa919c130 in JNI_CreateJavaVM /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/prims/jni.cpp:3678 #9 0xffffbe41145c in InitializeJVM /tmp/tone/run/jtreg/jdk-repo/src/java.base/share/native/libjli/java.c:1499 #10 0xffffbe41145c in JavaMain /tmp/tone/run/jtreg/jdk-repo/src/java.base/share/native/libjli/java.c:494 #11 0xffffbe41f748 in ThreadJavaMain /tmp/tone/run/jtreg/jdk-repo/src/java.base/unix/native/libjli/java_md.c:649 #12 0xffffbe4f0c24 in asan_thread_start ../../.././libsanitizer/asan/asan_interceptors.cpp:234 #13 0xffffbdc08f98 in thread_start (/lib64/libc.so.6+0x28f98) (BuildId: aabb4443d2eba4b2527cdf66d7295d1d61db58b0) Thread T1 created by T0 here: #0 0xffffbe560b58 in pthread_create ../../.././libsanitizer/asan/asan_interceptors.cpp:245 #1 0xffffbe4212a0 in CallJavaMainInNewThread /tmp/tone/run/jtreg/jdk-repo/src/java.base/unix/native/libjli/java_md.c:690 #2 0xffffbe41a6fc in ContinueInNewThread /tmp/tone/run/jtreg/jdk-repo/src/java.base/share/native/libjli/java.c:2333 #3 0xffffbe41c824 in JLI_Launch /tmp/tone/run/jtreg/jdk-repo/src/java.base/share/native/libjli/java.c:330 #4 0xaaaab6bf1d34 in main /tmp/tone/run/jtreg/jdk-repo/src/java.base/share/native/launcher/main.c:150 #5 0xffffbdc09ad4 in __libc_start_main (/lib64/libc.so.6+0x29ad4) (BuildId: aabb4443d2eba4b2527cdf66d7295d1d61db58b0) #6 0xaaaab6bf1fb4 in _start (/tmp/tone/run/jtreg/jdk-repo/build/linux-aarch64-server-fastdebug/jdk/bin/jmod+0x1fb4) SUMMARY: AddressSanitizer: heap-use-after-free /tmp/tone/run/jtreg/jdk-repo/src/hotspot/share/compiler/compileBroker.cpp:2377 in CompileBroker::invoke_compiler_on_method(CompileTask*) Shadow bytes around the buggy address: 0x5130000f1500: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x5130000f1580: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x5130000f1600: fd fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa 0x5130000f1680: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd 0x5130000f1700: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd =>0x5130000f1780: fd fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd 0x5130000f1800: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x5130000f1880: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x5130000f1900: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x5130000f1980: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x5130000f1a00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==183655==ABORTING