From ba5e30347fa5691cc9b0c4c620ee41daa135e610 Mon Sep 17 00:00:00 2001 From: Paul Floyd Date: Fri, 14 Feb 2025 20:45:02 +0100 Subject: [PATCH] Bug 496370 - Illumos: signal handling is broken This isn't a great fix, it just turns off optimization for a couple of signal frame functions. If ever I have time I'll try to find out out which part of -O1 is responsible, and maybe from that also exactly what part of the code. --- NEWS | 2 ++ coregrind/m_syswrap/syswrap-solaris.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 1c627c774..fb7642bb1 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 494327 Crash when running Helgrind built with #define TRACE_PTH_FNS 1 494337 All threaded applications cause still holding lock errors 495488 Add FreeBSD getrlimitusage syscall wrapper +496370 Illumos: signal handling is broken 496571 False positive for null key passed to bpf_map_get_next_key syscall. 469782 Valgrind does not support zstd-compressed debug sections 497130 Recognize new DWARF5 DW_LANG constants @@ -53,6 +54,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 499183 FreeBSD: differences in avx-vmovq output 499212 mmap() with MAP_ALIGNED() returns unaligned pointer + To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX where XXXXXX is the bug number as listed above. diff --git a/coregrind/m_syswrap/syswrap-solaris.c b/coregrind/m_syswrap/syswrap-solaris.c index 9abeb8500..faeea15f5 100644 --- a/coregrind/m_syswrap/syswrap-solaris.c +++ b/coregrind/m_syswrap/syswrap-solaris.c @@ -511,6 +511,9 @@ ULong ML_(fletcher64)(UInt *buf, SizeT blocks) return (sum2 << 32) | sum1; } +#pragma GCC push_options +#pragma GCC optimize ("O0") + /* Save a complete context (VCPU state, sigmask) of a given client thread into the vki_ucontext_t structure. This structure is supposed to be allocated in the client memory, a caller must make sure that the memory can @@ -666,6 +669,8 @@ void VG_(restore_context)(ThreadId tid, vki_ucontext_t *uc, CorePart part, } } +#pragma GCC pop_options + /* Set a client stack associated with a given thread id according to values passed in the vki_stack_t structure. */ static void set_stack(ThreadId tid, vki_stack_t *st) -- 2.47.2