# HG changeset patch # User Andrew John Hughes # Date 1603122976 -3600 # Node ID a218d3f3a16fde1d1bd3a9d63cce10bebbbe4628 # Parent 442218c885398f741732396545a7a6a14d752802 Add HotSpot backports for 3.17.0 to the alternate Hotspot builds for Shenandoah & AArch32. 2020-10-19 Andrew John Hughes Add HotSpot backports for 3.17.0 to the alternate Hotspot builds for Shenandoah & AArch32. * Makefile.am: (ICEDTEA_PATCHES): Add new patches. * NEWS: Updated. * patches/hotspot/aarch32/8152358-pr3800.patch, * patches/hotspot/aarch32/pr3798.patch: Link to Shenandoah versions. * patches/hotspot/shenandoah/8152358-pr3800.patch: Improve debugging output. * patches/hotspot/shenandoah/8251120-pr3793.patch: Add changeset header. * patches/hotspot/shenandoah/pr3798.patch: Fix format overflow warning from GCC 10. diff -r 442218c88539 -r a218d3f3a16f ChangeLog --- a/ChangeLog Mon Aug 31 03:15:02 2020 +0100 +++ b/ChangeLog Mon Oct 19 16:56:16 2020 +0100 @@ -1,3 +1,20 @@ +2020-10-19 Andrew John Hughes + + Add HotSpot backports for 3.17.0 to the alternate + Hotspot builds for Shenandoah & AArch32. + * Makefile.am: + (ICEDTEA_PATCHES): Add new patches. + * NEWS: Updated. + * patches/hotspot/aarch32/8152358-pr3800.patch, + * patches/hotspot/aarch32/pr3798.patch: + Link to Shenandoah versions. + * patches/hotspot/shenandoah/8152358-pr3800.patch: + Improve debugging output. + * patches/hotspot/shenandoah/8251120-pr3793.patch: + Add changeset header. + * patches/hotspot/shenandoah/pr3798.patch: + Fix format overflow warning from GCC 10. + 2020-08-23 Andrew John Hughes Bump to icedtea-3.17.0pre01. diff -r 442218c88539 -r a218d3f3a16f Makefile.am --- a/Makefile.am Mon Aug 31 03:15:02 2020 +0100 +++ b/Makefile.am Mon Oct 19 16:56:16 2020 +0100 @@ -381,7 +381,9 @@ patches/hotspot/$(HSBUILD)/8076475-pr3696.patch \ patches/hotspot/$(HSBUILD)/pr3728.patch \ patches/hotspot/$(HSBUILD)/8222286-pr3727-s390.patch \ - patches/hotspot/$(HSBUILD)/8251120-pr3793.patch + patches/hotspot/$(HSBUILD)/8251120-pr3793.patch \ + patches/hotspot/$(HSBUILD)/8152358-pr3800.patch \ + patches/hotspot/$(HSBUILD)/pr3798.patch # Shenandoah has the AArch64 port so should get the return value & debug build fixes # Shenandoah also needs some fixes to build on all architectures diff -r 442218c88539 -r a218d3f3a16f NEWS --- a/NEWS Mon Aug 31 03:15:02 2020 +0100 +++ b/NEWS Mon Oct 19 16:56:16 2020 +0100 @@ -121,10 +121,16 @@ - JDK-8238380, PR3798: java.base/unix/native/libjava/childproc.c "multiple definition" link errors with GCC10 - JDK-8238386, PR3798: (sctp) jdk.sctp/unix/native/libsctp/SctpNet.c "multiple definition" link errors with GCC10 - JDK-8238388, PR3798: libj2gss/NativeFunc.o "multiple definition" link errors with GCC10 +* Shenandoah + - JDK-8152358, PR3800: code and comment cleanups found during the hunt for 8077392 + - PR3798: Fix format-overflow error on GCC 10, caused by passing NULL to a '%s' directive * AArch64 port - JDK-8183925, PR3797: [AArch64] Decouple crash protection from watcher thread - JDK-8199712, PR3797: [AArch64] Flight Recorder - JDK-8215961, PR3797: jdk/jfr/event/os/TestCPUInformation.java fails on AArch64 +* AArch32 port + - JDK-8152358, PR3800: code and comment cleanups found during the hunt for 8077392 + - PR3798: Fix format-overflow error on GCC 10, caused by passing NULL to a '%s' directive New in release 3.16.0 (2020-05-02): diff -r 442218c88539 -r a218d3f3a16f patches/hotspot/aarch32/8152358-pr3800.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/aarch32/8152358-pr3800.patch Mon Oct 19 16:56:16 2020 +0100 @@ -0,0 +1,1 @@ +../shenandoah/8152358-pr3800.patch \ No newline at end of file diff -r 442218c88539 -r a218d3f3a16f patches/hotspot/aarch32/pr3798.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/aarch32/pr3798.patch Mon Oct 19 16:56:16 2020 +0100 @@ -0,0 +1,1 @@ +../shenandoah/pr3798.patch \ No newline at end of file diff -r 442218c88539 -r a218d3f3a16f patches/hotspot/shenandoah/8152358-pr3800.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/shenandoah/8152358-pr3800.patch Mon Oct 19 16:56:16 2020 +0100 @@ -0,0 +1,281 @@ +# HG changeset patch +# User Andrew John Hughes +# Date 1599349088 -3600 +# Sun Sep 06 00:38:08 2020 +0100 +# Node ID b73ff161ed0a57a46fdb3ed51291e39c67d880f5 +# Parent 412a170785df4e95fef3622d66910b90ad2245c8 +8152358, PR3800: code and comment cleanups found during the hunt for 8077392 + +diff --git openjdk.orig/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp openjdk/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp +--- openjdk.orig/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp ++++ openjdk/hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp +@@ -1,5 +1,5 @@ + /* +- * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. ++ * Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it +@@ -312,7 +312,7 @@ + Register OSR_buf = osrBufferPointer()->as_pointer_register(); + { assert(frame::interpreter_frame_monitor_size() == BasicObjectLock::size(), "adjust code below"); + int monitor_offset = BytesPerWord * method()->max_locals() + +- (2 * BytesPerWord) * (number_of_locks - 1); ++ (BasicObjectLock::size() * BytesPerWord) * (number_of_locks - 1); + // SharedRuntime::OSR_migration_begin() packs BasicObjectLocks in + // the OSR buffer using 2 word entries: first the lock and then + // the oop. +diff --git openjdk.orig/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp openjdk/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp +--- openjdk.orig/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp ++++ openjdk/hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp +@@ -722,7 +722,7 @@ + // Save (object->mark() | 1) into BasicLock's displaced header + movptr(Address(lock_reg, mark_offset), swap_reg); + +- assert(lock_offset == 0, "displached header must be first word in BasicObjectLock"); ++ assert(lock_offset == 0, "displaced header must be first word in BasicObjectLock"); + if (os::is_MP()) { + lock(); + } +@@ -811,7 +811,7 @@ + if (os::is_MP()) lock(); + cmpxchgptr(header_reg, Address(obj_reg, 0)); + +- // zero for recursive case ++ // zero for simple unlock of a stack-lock case + jcc(Assembler::zero, done); + + // Call the runtime routine for slow case. +diff --git openjdk.orig/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp openjdk/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp +--- openjdk.orig/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp ++++ openjdk/hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp +@@ -725,7 +725,7 @@ + movptr(Address(lock_reg, mark_offset), swap_reg); + + assert(lock_offset == 0, +- "displached header must be first word in BasicObjectLock"); ++ "displaced header must be first word in BasicObjectLock"); + + if (os::is_MP()) lock(); + cmpxchgptr(lock_reg, Address(obj_reg, 0)); +@@ -778,7 +778,7 @@ + // Kills: + // rax + // c_rarg0, c_rarg1, c_rarg2, c_rarg3, ... (param regs) +-// rscratch1, rscratch2 (scratch regs) ++// rscratch1 (scratch reg) + void InterpreterMacroAssembler::unlock_object(Register lock_reg) { + assert(lock_reg == c_rarg1, "The argument is only for looks. It must be rarg1"); + +@@ -823,7 +823,7 @@ + if (os::is_MP()) lock(); + cmpxchgptr(header_reg, Address(obj_reg, 0)); + +- // zero for recursive case ++ // zero for simple unlock of a stack-lock case + jcc(Assembler::zero, done); + + // Call the runtime routine for slow case. +diff --git openjdk.orig/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp openjdk/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp +--- openjdk.orig/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp ++++ openjdk/hotspot/src/cpu/x86/vm/macroAssembler_x86.cpp +@@ -1078,7 +1078,7 @@ + } + assert(markOopDesc::age_shift == markOopDesc::lock_bits + markOopDesc::biased_lock_bits, "biased locking makes assumptions about bit layout"); + Address mark_addr (obj_reg, oopDesc::mark_offset_in_bytes()); +- Address saved_mark_addr(lock_reg, 0); ++ NOT_LP64( Address saved_mark_addr(lock_reg, 0); ) + + if (PrintBiasedLockingStatistics && counters == NULL) { + counters = BiasedLocking::counters(); +@@ -1699,7 +1699,7 @@ + RTMLockingCounters* stack_rtm_counters, + Metadata* method_data, + bool use_rtm, bool profile_rtm) { +- // Ensure the register assignents are disjoint ++ // Ensure the register assignments are disjoint + assert(tmpReg == rax, ""); + + if (use_rtm) { +diff --git openjdk.orig/hotspot/src/share/vm/runtime/biasedLocking.cpp openjdk/hotspot/src/share/vm/runtime/biasedLocking.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/biasedLocking.cpp ++++ openjdk/hotspot/src/share/vm/runtime/biasedLocking.cpp +@@ -151,8 +151,13 @@ + if (!mark->has_bias_pattern()) { + if (TraceBiasedLocking) { + ResourceMark rm; +- tty->print_cr(" (Skipping revocation of object of type %s because it's no longer biased)", +- obj->klass()->external_name()); ++ tty->print_cr(" (Skipping revocation of object " INTPTR_FORMAT ++ ", mark " INTPTR_FORMAT ", type %s" ++ ", requesting thread " INTPTR_FORMAT ++ " because it's no longer biased)", ++ p2i((void *)obj), (intptr_t) mark, ++ obj->klass()->external_name(), ++ (intptr_t) requesting_thread); + } + return BiasedLocking::NOT_BIASED; + } +@@ -163,8 +168,15 @@ + + if (TraceBiasedLocking && (Verbose || !is_bulk)) { + ResourceMark rm; +- tty->print_cr("Revoking bias of object " INTPTR_FORMAT " , mark " INTPTR_FORMAT " , type %s , prototype header " INTPTR_FORMAT " , allow rebias %d , requesting thread " INTPTR_FORMAT, +- p2i((void *)obj), (intptr_t) mark, obj->klass()->external_name(), (intptr_t) obj->klass()->prototype_header(), (allow_rebias ? 1 : 0), (intptr_t) requesting_thread); ++ tty->print_cr("Revoking bias of object " INTPTR_FORMAT ", mark " ++ INTPTR_FORMAT ", type %s, prototype header " INTPTR_FORMAT ++ ", allow rebias %d, requesting thread " INTPTR_FORMAT, ++ p2i((void *)obj), ++ (intptr_t) mark, ++ obj->klass()->external_name(), ++ (intptr_t) obj->klass()->prototype_header(), ++ (allow_rebias ? 1 : 0), ++ (intptr_t) requesting_thread); + } + + JavaThread* biased_thread = mark->biased_locker(); +@@ -200,11 +212,17 @@ + obj->set_mark(unbiased_prototype); + } + if (TraceBiasedLocking && (Verbose || !is_bulk)) { +- tty->print_cr(" Revoked bias of object biased toward dead thread"); ++ tty->print_cr(" Revoked bias of object biased toward dead thread (" ++ PTR_FORMAT ")", p2i(biased_thread)); + } + return BiasedLocking::BIAS_REVOKED; + } + ++ if (TraceBiasedLocking && (Verbose || !is_bulk)) { ++ tty->print_cr(" Revoked bias of object biased toward live thread (" ++ PTR_FORMAT ")", p2i(biased_thread)); ++ } ++ + // Thread owning bias is alive. + // Check to see whether it currently owns the lock and, if so, + // write down the needed displaced headers to the thread's stack. +diff --git openjdk.orig/hotspot/src/share/vm/runtime/objectMonitor.cpp openjdk/hotspot/src/share/vm/runtime/objectMonitor.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/objectMonitor.cpp ++++ openjdk/hotspot/src/share/vm/runtime/objectMonitor.cpp +@@ -929,7 +929,7 @@ + // ~~~~~~~~ + // ::exit() uses a canonical 1-1 idiom with a MEMBAR although some of + // the fast-path operators have been optimized so the common ::exit() +-// operation is 1-0. See i486.ad fast_unlock(), for instance. ++// operation is 1-0, e.g., see macroAssembler_x86.cpp: fast_unlock(). + // The code emitted by fast_unlock() elides the usual MEMBAR. This + // greatly improves latency -- MEMBAR and CAS having considerable local + // latency on modern processors -- but at the cost of "stranding". Absent the +@@ -942,7 +942,7 @@ + // + // The CAS() in enter provides for safety and exclusion, while the CAS or + // MEMBAR in exit provides for progress and avoids stranding. 1-0 locking +-// eliminates the CAS/MEMBAR from the exist path, but it admits stranding. ++// eliminates the CAS/MEMBAR from the exit path, but it admits stranding. + // We detect and recover from stranding with timers. + // + // If a thread transiently strands it'll park until (a) another +diff --git openjdk.orig/hotspot/src/share/vm/runtime/os.cpp openjdk/hotspot/src/share/vm/runtime/os.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/os.cpp ++++ openjdk/hotspot/src/share/vm/runtime/os.cpp +@@ -1286,7 +1286,8 @@ + // We initialize the serialization page shift count here + // We assume a cache line size of 64 bytes + assert(SerializePageShiftCount == count, +- "thread size changed, fix SerializePageShiftCount constant"); ++ err_msg("JavaThread size changed; " ++ "SerializePageShiftCount constant should be %d", count)); + set_serialize_page_mask((uintptr_t)(vm_page_size() - sizeof(int32_t))); + } + +diff --git openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/sharedRuntime.cpp ++++ openjdk/hotspot/src/share/vm/runtime/sharedRuntime.cpp +@@ -2957,7 +2957,7 @@ + Method* moop = fr.interpreter_frame_method(); + int max_locals = moop->max_locals(); + // Allocate temp buffer, 1 word per local & 2 per active monitor +- int buf_size_words = max_locals + active_monitor_count*2; ++ int buf_size_words = max_locals + active_monitor_count * BasicObjectLock::size(); + intptr_t *buf = NEW_C_HEAP_ARRAY(intptr_t,buf_size_words, mtCode); + + // Copy the locals. Order is preserved so that loading of longs works. +diff --git openjdk.orig/hotspot/src/share/vm/runtime/synchronizer.cpp openjdk/hotspot/src/share/vm/runtime/synchronizer.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/synchronizer.cpp ++++ openjdk/hotspot/src/share/vm/runtime/synchronizer.cpp +@@ -184,38 +184,52 @@ + } + + void ObjectSynchronizer::fast_exit(oop object, BasicLock* lock, TRAPS) { +- assert(!object->mark()->has_bias_pattern(), "should not see bias pattern here"); +- // if displaced header is null, the previous enter is recursive enter, no-op ++ markOop mark = object->mark(); ++ // We cannot check for Biased Locking if we are racing an inflation. ++ assert(mark == markOopDesc::INFLATING() || ++ !mark->has_bias_pattern(), "should not see bias pattern here"); ++ + markOop dhw = lock->displaced_header(); +- markOop mark ; + if (dhw == NULL) { +- // Recursive stack-lock. +- // Diagnostics -- Could be: stack-locked, inflating, inflated. +- mark = object->mark() ; +- assert (!mark->is_neutral(), "invariant") ; +- if (mark->has_locker() && mark != markOopDesc::INFLATING()) { +- assert(THREAD->is_lock_owned((address)mark->locker()), "invariant") ; ++ // If the displaced header is NULL, then this exit matches up with ++ // a recursive enter. No real work to do here except for diagnostics. ++#ifndef PRODUCT ++ if (mark != markOopDesc::INFLATING()) { ++ // Only do diagnostics if we are not racing an inflation. Simply ++ // exiting a recursive enter of a Java Monitor that is being ++ // inflated is safe; see the has_monitor() comment below. ++ assert(!mark->is_neutral(), "invariant"); ++ assert(!mark->has_locker() || ++ THREAD->is_lock_owned((address)mark->locker()), "invariant"); ++ if (mark->has_monitor()) { ++ // The BasicLock's displaced_header is marked as a recursive ++ // enter and we have an inflated Java Monitor (ObjectMonitor). ++ // This is a special case where the Java Monitor was inflated ++ // after this thread entered the stack-lock recursively. When a ++ // Java Monitor is inflated, we cannot safely walk the Java ++ // Monitor owner's stack and update the BasicLocks because a ++ // Java Monitor can be asynchronously inflated by a thread that ++ // does not own the Java Monitor. ++ ObjectMonitor * m = mark->monitor(); ++ assert(((oop)(m->object()))->mark() == mark, "invariant"); ++ assert(m->is_entered(THREAD), "invariant"); ++ } + } +- if (mark->has_monitor()) { +- ObjectMonitor * m = mark->monitor() ; +- assert(((oop)(m->object()))->mark() == mark, "invariant") ; +- assert(m->is_entered(THREAD), "invariant") ; +- } +- return ; ++#endif ++ return; + } + +- mark = object->mark() ; +- +- // If the object is stack-locked by the current thread, try to +- // swing the displaced header from the box back to the mark. + if (mark == (markOop) lock) { +- assert (dhw->is_neutral(), "invariant") ; +- if ((markOop) Atomic::cmpxchg_ptr (dhw, object->mark_addr(), mark) == mark) { +- TEVENT (fast_exit: release stacklock) ; +- return; +- } ++ // If the object is stack-locked by the current thread, try to ++ // swing the displaced header from the BasicLock back to the mark. ++ assert (dhw->is_neutral(), "invariant") ; ++ if ((markOop) Atomic::cmpxchg_ptr(dhw, object->mark_addr(), mark) == mark) { ++ TEVENT(fast_exit: release stack-lock); ++ return; ++ } + } + ++ // We have to take the slow-path of possible inflation and then exit. + ObjectSynchronizer::inflate(THREAD, object)->exit (true, THREAD) ; + } + diff -r 442218c88539 -r a218d3f3a16f patches/hotspot/shenandoah/8251120-pr3793.patch --- a/patches/hotspot/shenandoah/8251120-pr3793.patch Mon Aug 31 03:15:02 2020 +0100 +++ b/patches/hotspot/shenandoah/8251120-pr3793.patch Mon Oct 19 16:56:16 2020 +0100 @@ -1,3 +1,13 @@ +# HG changeset patch +# User andrew +# Date 1598596701 -3600 +# Fri Aug 28 07:38:21 2020 +0100 +# Node ID 7323b2187a50e3d04cdc3b0e35bac32875e34e09 +# Parent b73ff161ed0a57a46fdb3ed51291e39c67d880f5 +8251120, PR3793: [8u] HotSpot build assumes ENABLE_JFR is set to either true or false +Summary: Only test for ENABLE_JFR being true, and assume undefined == false +Reviewed-by: neugens + diff --git openjdk.orig/hotspot/make/aix/makefiles/buildtree.make openjdk/hotspot/make/aix/makefiles/buildtree.make --- openjdk.orig/hotspot/make/aix/makefiles/buildtree.make +++ openjdk/hotspot/make/aix/makefiles/buildtree.make @@ -61,7 +71,7 @@ diff --git openjdk.orig/hotspot/make/linux/makefiles/vm.make openjdk/hotspot/make/linux/makefiles/vm.make --- openjdk.orig/hotspot/make/linux/makefiles/vm.make +++ openjdk/hotspot/make/linux/makefiles/vm.make -@@ -150,7 +150,7 @@ +@@ -158,7 +158,7 @@ LIBJVM_DEBUGINFO = lib$(JVM).debuginfo LIBJVM_DIZ = lib$(JVM).diz @@ -85,7 +95,7 @@ diff --git openjdk.orig/hotspot/make/solaris/makefiles/vm.make openjdk/hotspot/make/solaris/makefiles/vm.make --- openjdk.orig/hotspot/make/solaris/makefiles/vm.make +++ openjdk/hotspot/make/solaris/makefiles/vm.make -@@ -164,7 +164,7 @@ +@@ -172,7 +172,7 @@ LIBJVM_DEBUGINFO = lib$(JVM).debuginfo LIBJVM_DIZ = lib$(JVM).diz diff -r 442218c88539 -r a218d3f3a16f patches/hotspot/shenandoah/pr3798.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/shenandoah/pr3798.patch Mon Oct 19 16:56:16 2020 +0100 @@ -0,0 +1,44 @@ +# HG changeset patch +# User Andrew John Hughes +# Date 1598841656 -3600 +# Mon Aug 31 03:40:56 2020 +0100 +# Node ID 9f2ceb42dc64f72ae83997982383c30a454acdb2 +# Parent 3511db5b989804f5df37eda1dcefc28e44e964a6 +PR3798: Fix format-overflow error on GCC 10, caused by passing NULL to a '%s' directive + +diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp +--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp +@@ -4947,8 +4947,9 @@ + static os_sigaction_t os_sigaction = NULL; + + void os::Linux::check_signal_handler(int sig) { +- char buf[O_BUFLEN]; ++ char buf[O_BUFLEN], enbuf[O_BUFLEN]; + address jvmHandler = NULL; ++ const char* exname = os::exception_name(sig, enbuf, O_BUFLEN); + + + struct sigaction act; +@@ -4999,7 +5000,7 @@ + } + + if (thisHandler != jvmHandler) { +- tty->print("Warning: %s handler ", exception_name(sig, buf, O_BUFLEN)); ++ tty->print("Warning: %s handler ", exname == NULL ? "(null)" : exname); + tty->print("expected:%s", get_signal_handler_name(jvmHandler, buf, O_BUFLEN)); + tty->print_cr(" found:%s", get_signal_handler_name(thisHandler, buf, O_BUFLEN)); + // No need to check this sig any longer +@@ -5007,10 +5008,10 @@ + // Running under non-interactive shell, SHUTDOWN2_SIGNAL will be reassigned SIG_IGN + if (sig == SHUTDOWN2_SIGNAL && !isatty(fileno(stdin))) { + tty->print_cr("Running in non-interactive shell, %s handler is replaced by shell", +- exception_name(sig, buf, O_BUFLEN)); ++ exname == NULL ? "(null)" : exname); + } + } else if(os::Linux::get_our_sigflags(sig) != 0 && (int)act.sa_flags != os::Linux::get_our_sigflags(sig)) { +- tty->print("Warning: %s handler flags ", exception_name(sig, buf, O_BUFLEN)); ++ tty->print("Warning: %s handler flags ", exname == NULL ? "(null)" : exname); + tty->print("expected:" PTR32_FORMAT, os::Linux::get_our_sigflags(sig)); + tty->print_cr(" found:" PTR32_FORMAT, act.sa_flags); + // No need to check this sig any longer