# HG changeset patch # User martin # Date 1529714961 25200 # Node ID 0828a0f6676b25fa3cc7b3c29db2dcb1f8d62329 # Parent a1d7444076e4d79a8b92441b8ff9f41d722f591d 8205199: more Linux clang compile failures Reviewed-by: dholmes, kbarrett, stuefe Contributed-by: Arthur Eubanks , Thomas Stuefe diff -r a1d7444076e4 -r 0828a0f6676b src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp --- a/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp Fri Jun 22 17:36:03 2018 -0700 +++ b/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp Fri Jun 22 17:49:21 2018 -0700 @@ -96,11 +96,11 @@ address os::current_stack_pointer() { #ifdef SPARC_WORKS register void *esp; - __asm__("mov %%"SPELL_REG_SP", %0":"=r"(esp)); + __asm__("mov %%" SPELL_REG_SP ", %0":"=r"(esp)); return (address) ((char*)esp + sizeof(long)*2); #elif defined(__clang__) intptr_t* esp; - __asm__ __volatile__ ("mov %%"SPELL_REG_SP", %0":"=r"(esp):); + __asm__ __volatile__ ("mov %%" SPELL_REG_SP ", %0":"=r"(esp):); return (address) esp; #else register void *esp __asm__ (SPELL_REG_SP); @@ -234,10 +234,10 @@ intptr_t* _get_previous_fp() { #ifdef SPARC_WORKS register intptr_t **ebp; - __asm__("mov %%"SPELL_REG_FP", %0":"=r"(ebp)); + __asm__("mov %%" SPELL_REG_FP ", %0":"=r"(ebp)); #elif defined(__clang__) intptr_t **ebp; - __asm__ __volatile__ ("mov %%"SPELL_REG_FP", %0":"=r"(ebp):); + __asm__ __volatile__ ("mov %%" SPELL_REG_FP ", %0":"=r"(ebp):); #else register intptr_t **ebp __asm__ (SPELL_REG_FP); #endif diff -r a1d7444076e4 -r 0828a0f6676b src/hotspot/share/utilities/debug.cpp --- a/src/hotspot/share/utilities/debug.cpp Fri Jun 22 17:36:03 2018 -0700 +++ b/src/hotspot/share/utilities/debug.cpp Fri Jun 22 17:49:21 2018 -0700 @@ -714,16 +714,13 @@ } } -static bool store_context(const void* context) { - if (memcpy(&g_stored_assertion_context, context, sizeof(ucontext_t)) == false) { - return false; - } +static void store_context(const void* context) { + memcpy(&g_stored_assertion_context, context, sizeof(ucontext_t)); #if defined(__linux) && defined(PPC64) // on Linux ppc64, ucontext_t contains pointers into itself which have to be patched up // after copying the context (see comment in sys/ucontext.h): *((void**) &g_stored_assertion_context.uc_mcontext.regs) = &(g_stored_assertion_context.uc_mcontext.gp_regs); #endif - return true; } bool handle_assert_poison_fault(const void* ucVoid, const void* faulting_address) { @@ -734,9 +731,8 @@ if (ucVoid) { const intx my_tid = os::current_thread_id(); if (Atomic::cmpxchg(my_tid, &g_asserting_thread, (intx)0) == 0) { - if (store_context(ucVoid)) { - g_assertion_context = &g_stored_assertion_context; - } + store_context(ucVoid); + g_assertion_context = &g_stored_assertion_context; } } return true;